From f0dc4ec8cc3407f7d6b013a59a66d68d1bf28781 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Mon, 29 Dec 2025 20:53:58 +0100 Subject: [PATCH] patches integrated info another repo --- ...rst_ox-rst.el_add-code-block-caption.patch | 45 ------------------- ...x-rst_ox-rst.el_add-single-row-table.patch | 35 --------------- .../ox-rst_ox-rst.el_table-header-line.patch | 20 --------- 3 files changed, 100 deletions(-) delete mode 100644 lisp/0patches/ox-rst_ox-rst.el_add-code-block-caption.patch delete mode 100644 lisp/0patches/ox-rst_ox-rst.el_add-single-row-table.patch delete mode 100644 lisp/0patches/ox-rst_ox-rst.el_table-header-line.patch diff --git a/lisp/0patches/ox-rst_ox-rst.el_add-code-block-caption.patch b/lisp/0patches/ox-rst_ox-rst.el_add-code-block-caption.patch deleted file mode 100644 index c14fe7c2..00000000 --- a/lisp/0patches/ox-rst_ox-rst.el_add-code-block-caption.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/lisp/ox-rst/ox-rst.el b/lisp/ox-rst/ox-rst.el -index 1d66f88d..fc423eac 100644 ---- a/lisp/ox-rst/ox-rst.el -+++ b/lisp/ox-rst/ox-rst.el -@@ -1319,8 +1319,11 @@ holding contextual information." - "Transcode a SRC-BLOCK element from Org to reStructuredText. - CONTENTS holds the contents of the item. INFO is a plist holding - contextual information." -+ ;; code is for inline within text -+ ;; code-block (or the alias sourcecode) are for a separate block - (when (org-string-nw-p (org-element-property :value src-block)) - (let* ((lang (org-element-property :language src-block)) -+ (caption (org-export-get-caption src-block)) - (label (org-element-property :name src-block)) - (value (org-remove-indentation - (org-element-property :value src-block))) -@@ -1330,7 +1333,7 @@ contextual information." - (org-export-read-attribute :attr_rst src-block)) - (class (plist-get attributes :class))) - (cond -- ;; Case 1. -+ ;; Case 1. code-block directive. - ((eq codeblockd 'code-block) - (let ((lst-lang - (or (cadr (assq (intern lang) org-rst-pygments-langs)) lang))) -@@ -1339,9 +1342,10 @@ contextual information." - (when num-start (format " :lineno-start: %s\n" (1+ num-start))) - (when class (format " :class: %s\n" class)) - (when label (format " :name: %s\n" label)) -+ (when caption (format " :caption: %s\n" (org-export-data caption info))) - "\n" - (org-rst--indent-string value org-rst-quote-margin)))) -- ;; Case 2. code. -+ ;; Case 2. code directive. - ((eq codeblockd 'code) - (let ((lst-lang - (or (cadr (assq (intern lang) org-rst-pygments-langs)) lang))) -@@ -1352,6 +1356,7 @@ contextual information." - (when label (format " :name: %s\n" label)) - "\n" - (org-rst--indent-string value org-rst-quote-margin)))) -+ ;; Case 3. literal block. - (t - (concat - "::\n" diff --git a/lisp/0patches/ox-rst_ox-rst.el_add-single-row-table.patch b/lisp/0patches/ox-rst_ox-rst.el_add-single-row-table.patch deleted file mode 100644 index 544d3af8..00000000 --- a/lisp/0patches/ox-rst_ox-rst.el_add-single-row-table.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/lisp/ox-rst/ox-rst.el b/lisp/ox-rst/ox-rst.el -index fc423eac..0b19576d 100644 ---- a/lisp/ox-rst/ox-rst.el -+++ b/lisp/ox-rst/ox-rst.el -@@ -1542,7 +1542,29 @@ a communication channel." - (when (= 0 row-number) - (concat (funcall makeline contents ?-) "\n")) - "|" contents "|\n" hline)) -- nil -+ ;; nil -+ ;; the else section is hit whenever there is a new group, i.e. the row -+ ;; after a hline, OR if there is only one row in the table!!! -+ ;; (org-export-table-row-number table-row info) returns non-nil if there -+ ;; is only ONE row in the table (nil otherwise) -+ ;; same for `contents'; it is nil if not first row -+ (when contents -+ (let* ((makeline -+ (function -+ (lambda (_rowcontents linebit) -+ (format "+%s+" -+ (mapconcat -+ 'identity -+ (mapcar -+ (lambda (table-cell) -+ (make-string (string-width table-cell) -+ linebit)) -+ (split-string contents "|")) -+ "+")))))) -+ (concat -+ (concat (funcall makeline contents ?-) "\n") -+ (concat "|" contents "|\n") -+ (concat (funcall makeline contents ?-) "\n")))) - ))) - - diff --git a/lisp/0patches/ox-rst_ox-rst.el_table-header-line.patch b/lisp/0patches/ox-rst_ox-rst.el_table-header-line.patch deleted file mode 100644 index 726a33a8..00000000 --- a/lisp/0patches/ox-rst_ox-rst.el_table-header-line.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/lisp/ox-rst/ox-rst.el b/lisp/ox-rst/ox-rst.el -index 0b19576d..ce958352 100644 ---- a/lisp/ox-rst/ox-rst.el -+++ b/lisp/ox-rst/ox-rst.el -@@ -1513,8 +1513,13 @@ a communication channel." - (cond - ((not (= 1 rowgroup-number)) - ?-) -- ((org-export-table-has-header-p -- (org-element-lineage table-row 'table) info) -+ ;; ((org-export-table-has-header-p -+ ;; (org-element-lineage table-row 'table) info) -+ ;; ?=) -+ ;; double line only at the end of the header -+ ((and (org-export-table-has-header-p -+ (org-element-lineage table-row 'table) info) -+ (org-export-table-row-ends-header-p table-row info)) - ?=) - (t ?-))) - (makeline