mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-13 16:38:24 +00:00
ox-org.el (org-org-publish-to-org): Kill buffers not visited at publication time
* ox-org.el (org-org-publish-to-org): Kill buffers not visited at publication time.
This commit is contained in:
parent
e996307556
commit
f5bf08c92c
@ -144,11 +144,13 @@ Return output file name."
|
||||
(when (plist-get plist :htmlized-source)
|
||||
(require 'htmlize)
|
||||
(require 'ox-html)
|
||||
(or (find-buffer-visiting filename)
|
||||
(find-file filename))
|
||||
(font-lock-fontify-buffer)
|
||||
(let* ((htmlize-output-type 'css)
|
||||
(newbuf (htmlize-buffer)))
|
||||
(let* ((org-inhibit-startup t)
|
||||
(htmlize-output-type 'css)
|
||||
(visitingp (find-buffer-visiting filename))
|
||||
(work-buffer (or visitingp (find-file filename)))
|
||||
newbuf)
|
||||
(font-lock-fontify-buffer)
|
||||
(setq newbuf (htmlize-buffer))
|
||||
(with-current-buffer newbuf
|
||||
(when org-org-htmlized-css-url
|
||||
(goto-char (point-min))
|
||||
@ -159,7 +161,8 @@ Return output file name."
|
||||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">"
|
||||
org-org-htmlized-css-url) t t)))
|
||||
(write-file (concat pub-dir (file-name-nondirectory filename) ".html")))
|
||||
(kill-buffer newbuf))
|
||||
(kill-buffer newbuf)
|
||||
(unless visitingp (kill-buffer work-buffer)))
|
||||
(set-buffer-modified-p nil)))
|
||||
|
||||
(provide 'ox-org)
|
||||
|
Loading…
Reference in New Issue
Block a user