diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-07-09 20:00:31 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-07-09 20:00:31 -0400 |
| commit | cf7f4c44c76e8674e8c2d1f8b8a515f2e844a432 (patch) | |
| tree | 66011bc707c53d2b0b2ff4d7edccbbfe370ca9e2 /ox-haunt.el | |
| parent | f6fa6d75b85e5bfa70c84292b9a9194e3fb2d686 (diff) | |
Propagate `:haunt-base-dir' if set as a buffer-local custom.
Diffstat (limited to 'ox-haunt.el')
| -rw-r--r-- | ox-haunt.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ox-haunt.el b/ox-haunt.el index 466456f..103c621 100644 --- a/ox-haunt.el +++ b/ox-haunt.el @@ -103,7 +103,9 @@ specified on a per-file basis with the 'HAUNT_BASE_DIR' keyword." "Export current buffer to a Haunt post buffer." (interactive) (org-export-to-buffer 'haunt "*Org Haunt Export*" - async subtreep visible-only body-only ext-plist + async subtreep visible-only body-only + ;; Necessary to propagate a buffer-local value for `ox-haunt-base-dir'. + (append `(:haunt-base-dir ,dest-path) ext-plist) (lambda () (set-auto-mode t)))) ;;;###autoload @@ -113,7 +115,7 @@ specified on a per-file basis with the 'HAUNT_BASE_DIR' keyword." (interactive) (let* ((info (org-combine-plists (org-export--get-export-attributes - 'hugo subtreep visible-only) + 'haunt subtreep visible-only) (org-export--get-buffer-attributes) (org-export-get-environment 'haunt subtreep))) (dest-path (plist-get info :haunt-base-dir))) @@ -125,7 +127,9 @@ specified on a per-file basis with the 'HAUNT_BASE_DIR' keyword." (file (concat dest-path "/posts/" file)) (org-export-coding-system org-html-coding-system)) (org-export-to-file 'haunt file - async subtreep visible-only body-only ext-plist)))) + async subtreep visible-only body-only + ;; Necessary to propagate a buffer-local value for `ox-haunt-base-dir'. + (append `(:haunt-base-dir ,dest-path) ext-plist))))) (provide 'ox-haunt) ;;; ox-haunt.el ends here |