fix(org): void-variable doom-user-dir on org-async export

This advice needed to be updated to reflect recent changes.

Fix: #6624
This commit is contained in:
Henrik Lissner 2022-09-16 03:16:31 +02:00
parent e499e05ff3
commit 511f0ca38f
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -629,16 +629,17 @@ mutating hooks on exported output, like formatters."
:around '(org-export-to-file org-export-as) :around '(org-export-to-file org-export-as)
(let ((old-async-init-file org-export-async-init-file) (let ((old-async-init-file org-export-async-init-file)
(org-export-async-init-file (make-temp-file "doom-org-async-export"))) (org-export-async-init-file (make-temp-file "doom-org-async-export")))
(with-temp-file org-export-async-init-file (doom-file-write
(prin1 `(progn (setq org-export-async-debug org-export-async-init-file
,(or org-export-async-debug `((setq org-export-async-debug ,(or org-export-async-debug debug-on-error)
debug-on-error) load-path ',load-path)
load-path ',load-path) (unwind-protect
(unwind-protect (let ((init-file ,old-async-init-file))
(load ,(or old-async-init-file user-init-file) (if init-file
nil t) (load init-file nil t)
(delete-file load-file-name))) (load ,early-init-file nil t)
(current-buffer))) (require 'doom-start)))
(delete-file load-file-name))))
(apply fn args)))) (apply fn args))))