lang/org: apply +org--fix-async-export-a to org-export-as
This commit is contained in:
parent
ecca37b07b
commit
f40a2e1ed7
1 changed files with 13 additions and 11 deletions
|
@ -491,17 +491,19 @@ the exported output (i.e. formatters)."
|
|||
(apply orig-fn args)))
|
||||
|
||||
(defadvice! +org--fix-async-export-a (orig-fn &rest args)
|
||||
:around #'org-export-to-file
|
||||
(if (not org-export-in-background)
|
||||
(apply orig-fn args)
|
||||
(let ((user-init-file (or org-export-async-init-file user-init-file)))
|
||||
(setq org-export-async-init-file (make-temp-file "doom-org-async-export"))
|
||||
:around '(org-export-to-file org-export-as)
|
||||
(let ((old-async-init-file org-export-async-init-file)
|
||||
(org-export-async-init-file (make-temp-file "doom-org-async-export")))
|
||||
(with-temp-file org-export-async-init-file
|
||||
(prin1 `(progn (setq org-export-async-debug ,debug-on-error
|
||||
(prin1 `(progn (setq org-export-async-debug
|
||||
,(or org-export-async-debug
|
||||
debug-on-error)
|
||||
load-path ',load-path)
|
||||
(load ,user-init-file nil t))
|
||||
(load ,(or old-async-init-file user-init-file)
|
||||
nil t)
|
||||
(delete-file ,org-export-async-init-file))
|
||||
(current-buffer)))
|
||||
(apply orig-fn args)))))
|
||||
(apply orig-fn args))))
|
||||
|
||||
|
||||
(defun +org-init-habit-h ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue