mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-12 16:24:10 +00:00
org-babel-tangle: now conservative about whitespace insertion around tangled blocks
This commit is contained in:
parent
43bd90ef81
commit
cd405fad22
@ -183,17 +183,17 @@ form
|
||||
(link source-name params body)"
|
||||
(flet ((insert-comment (text)
|
||||
(when commentable
|
||||
(insert "\n")
|
||||
(comment-region (point) (progn (insert text) (point)))
|
||||
(move-end-of-line nil))))
|
||||
(move-end-of-line nil)
|
||||
(insert "\n"))))
|
||||
(let ((link (first spec))
|
||||
(source-name (second spec))
|
||||
(body (fourth spec))
|
||||
(commentable (not (fifth spec))))
|
||||
(insert "\n\n")
|
||||
(insert-comment (format "[[%s][%s]]" (org-link-escape link) source-name))
|
||||
(insert (format "\n%s\n" (org-babel-chomp body)))
|
||||
(insert-comment (format "%s ends here" source-name))
|
||||
(insert "\n"))))
|
||||
(insert (format "%s" (org-babel-chomp body)))
|
||||
(insert-comment (format "%s ends here" source-name)))))
|
||||
|
||||
(provide 'org-babel-tangle)
|
||||
;;; org-babel-tangle.el ends here
|
||||
|
Loading…
Reference in New Issue
Block a user