~jakob/ox-haunt

5aa4de8eff0b387e9583eb31d1d311e1c95dc146 — Jakob L. Kreuze 5 years ago 1fd13da
Fix propagation of `dest-path' in `ox-haunt-export-as-html'
1 files changed, 11 insertions(+), 5 deletions(-)

M ox-haunt.el
M ox-haunt.el => ox-haunt.el +11 -5
@@ 130,11 130,17 @@ Export is done in a buffer named \"*Org Haunt Export*\", which
will be displayed when `org-export-show-temporary-export-buffer'
is non-nil."
  (interactive)
  (org-export-to-buffer 'haunt "*Org Haunt Export*"
    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))))
  (let* ((info (org-combine-plists
                (org-export--get-export-attributes
                 'haunt subtreep visible-only)
                (org-export--get-buffer-attributes)
                (org-export-get-environment 'haunt subtreep)))
         (dest-path (plist-get info :haunt-base-dir)))
    (org-export-to-buffer 'haunt "*Org Haunt Export*"
      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
(defun ox-haunt-export-to-html