Make org-babel-tangle comment with ;;*.
With a view to providing org-style folding with the outline-regexp settings from Tassilo Horn / Michael Zeller / Sebastain Vauban.
This commit is contained in:
parent
690ed664c6
commit
c6b628d3ad
|
@ -145,13 +145,14 @@ assumes that the appropriate major-mode is set. SPEC has the
|
||||||
form
|
form
|
||||||
|
|
||||||
(link source-name params body)"
|
(link source-name params body)"
|
||||||
(flet ((insert-comment (text)
|
|
||||||
(comment-region (point) (progn (insert text) (point)))))
|
|
||||||
(let ((link (first spec))
|
(let ((link (first spec))
|
||||||
(source-name (second spec))
|
(source-name (second spec))
|
||||||
(body (fourth spec)))
|
(body (fourth spec))
|
||||||
|
(comment-padding "* "))
|
||||||
|
(flet ((insert-comment (text)
|
||||||
|
(comment-region (point) (progn (insert text) (point)))))
|
||||||
(insert "\n\n")
|
(insert "\n\n")
|
||||||
(insert-comment (format "[[%s][%s]]" (org-link-escape link) source-name))
|
(insert-comment (format "* [[%s][%s]]" (org-link-escape link) source-name))
|
||||||
(insert (format "\n%s\n" (org-babel-chomp body)))
|
(insert (format "\n%s\n" (org-babel-chomp body)))
|
||||||
(insert-comment (format "%s ends here" source-name))
|
(insert-comment (format "%s ends here" source-name))
|
||||||
(insert "\n"))))
|
(insert "\n"))))
|
||||||
|
|
Loading…
Reference in New Issue