|
@@ -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)))
|
|
|
|
|
|
|