Fix #4727: wrong-type-arg error on async org export

Because org-export-async-init-file will have a different value in the
temp buffer created for the temp file.
This commit is contained in:
Henrik Lissner 2021-03-10 12:53:54 -05:00
parent d76d50c1c9
commit 7c38eee96c

View file

@ -539,9 +539,10 @@ the exported output (i.e. formatters)."
,(or org-export-async-debug ,(or org-export-async-debug
debug-on-error) debug-on-error)
load-path ',load-path) load-path ',load-path)
(load ,(or old-async-init-file user-init-file) (unwind-protect
nil t) (load ,(or old-async-init-file user-init-file)
(delete-file ,org-export-async-init-file)) nil t)
(delete-file load-file-name)))
(current-buffer))) (current-buffer)))
(apply orig-fn args)))) (apply orig-fn args))))