From 5aa4de8eff0b387e9583eb31d1d311e1c95dc146 Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Sat, 20 Jul 2019 19:51:03 -0400 Subject: Fix propagation of `dest-path' in `ox-haunt-export-as-html' --- ox-haunt.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ox-haunt.el b/ox-haunt.el index 182bd7b..c18b370 100644 --- a/ox-haunt.el +++ b/ox-haunt.el @@ -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 -- cgit v1.3