summaryrefslogtreecommitdiff
path: root/lisp/org/ox-org.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/ox-org.el')
-rw-r--r--lisp/org/ox-org.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/org/ox-org.el b/lisp/org/ox-org.el
index 195b9d76587..4bee45ab014 100644
--- a/lisp/org/ox-org.el
+++ b/lisp/org/ox-org.el
@@ -251,12 +251,13 @@ Return output file name."
(html-ext (concat "." (or (plist-get plist :html-extension)
org-html-extension "html")))
(visitingp (find-buffer-visiting filename))
- (work-buffer (or visitingp (find-file filename)))
+ (work-buffer (or visitingp (find-file-noselect filename)))
newbuf)
- (font-lock-fontify-buffer)
- (show-all)
- (org-show-block-all)
- (setq newbuf (htmlize-buffer))
+ (with-current-buffer work-buffer
+ (org-font-lock-ensure)
+ (show-all)
+ (org-show-block-all)
+ (setq newbuf (htmlize-buffer)))
(with-current-buffer newbuf
(when org-org-htmlized-css-url
(goto-char (point-min))
@@ -265,10 +266,12 @@ Return output file name."
(replace-match
(format
"<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">"
- org-org-htmlized-css-url) t t)))
+ org-org-htmlized-css-url)
+ t t)))
(write-file (concat pub-dir (file-name-nondirectory filename) html-ext)))
(kill-buffer newbuf)
(unless visitingp (kill-buffer work-buffer)))
+ ;; FIXME: Why? Which buffer is this supposed to apply to?
(set-buffer-modified-p nil)))