summaryrefslogtreecommitdiff
path: root/ennum.el
diff options
context:
space:
mode:
authorArun Isaac2020-08-03 00:59:26 +0530
committerArun Isaac2020-08-03 01:24:39 +0530
commitccd01d1aee5cf5093e4237399a61a24ca3d4b0f9 (patch)
tree73b6a33a5a4daa65c4b6cab4dbe2ad046ac20026 /ennum.el
parent2ef369f0fd06b4eb48b9f539553835838daf621f (diff)
downloadennum-ccd01d1aee5cf5093e4237399a61a24ca3d4b0f9.tar.gz
ennum-ccd01d1aee5cf5093e4237399a61a24ca3d4b0f9.tar.lz
ennum-ccd01d1aee5cf5093e4237399a61a24ca3d4b0f9.zip
Use output-html-file argument passed to ennum-export-post.
Prior to this, the output-html-file was disregarded and recomputed unnecessarily. * ennum.el (ennum-export-post): Use output-html-file argument, instead of recomputing it.
Diffstat (limited to 'ennum.el')
-rw-r--r--ennum.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/ennum.el b/ennum.el
index bfd3bc7..a5a37ab 100644
--- a/ennum.el
+++ b/ennum.el
@@ -295,15 +295,15 @@ code, without surrounding template. See `org-export-as'.
When optional argument OUTPUT-HTML-FILE is nil, return exported
result as a string."
- (let ((output-file (ennum--org-output-filename (ennum-post-filename post))))
- (ennum-mkdir-p (file-name-directory output-file))
- (let ((system-time-locale (map-elt (ennum-setting :locale-alist)
- (ennum-post-language post) nil 'string=))
- (ext-plist (list :ennum-post post)))
- (ennum-with-file-contents interned-org-file
- (if output-html-file
- (org-export-to-file 'ennum-html output-file nil nil nil body-only ext-plist)
- (org-export-as 'ennum-html nil nil body-only ext-plist))))))
+ (let ((system-time-locale (map-elt (ennum-setting :locale-alist)
+ (ennum-post-language post) nil 'string=))
+ (ext-plist (list :ennum-post post)))
+ (ennum-with-file-contents interned-org-file
+ (cond
+ (output-html-file
+ (ennum-mkdir-p (file-name-directory output-html-file))
+ (org-export-to-file 'ennum-html output-html-file nil nil nil body-only ext-plist))
+ (t (org-export-as 'ennum-html nil nil body-only ext-plist))))))
(defun ennum-publish-post (post)
(let ((interned-org-file (ennum-intern (ennum-post-filename post))))