Improve comments in source block

This commit is contained in:
Gerard Vermeulen 2021-12-06 08:30:31 +01:00
parent b14dfe3b31
commit ab44d70017
1 changed files with 5 additions and 4 deletions

View File

@ -796,9 +796,9 @@ Stolen from [[https://git.sr.ht/~bzg/org-contrib/tree/master/item/lisp/ox-extra.
(header (org-export-read-attribute :header block :header)))
(when (and (string= type "LATEX") (string= header "yes"))
block))))))
;; Set point to where to insert LaTeX header lines after
;; deleting the block.
(mapc (lambda (block)
;; Set point to where to insert LaTeX header lines
;; after deleting the block.
(goto-char (org-element-property :post-affiliated block))
(let ((lines
(split-string (org-element-property :value block) "\n")))
@ -808,8 +808,9 @@ Stolen from [[https://git.sr.ht/~bzg/org-contrib/tree/master/item/lisp/ox-extra.
(insert (concat "#+latex_header: "
(replace-regexp-in-string "\\` *" "" line)
"\n")))))
;; Reverse to go upwards to avoid wrecking the numeric
;; positions earlier in the file.
;; Reverse to go upwards to avoid wrecking the list of
;; block positions in the file that would occur in case
;; of going downwards.
(reverse blocks)))))
(defun my-activate-buffer-local-org-export-filters ()