Fix #3175: inhibit save hooks on org-export-to-file

This commit is contained in:
Henrik Lissner 2020-06-04 23:48:16 -04:00
parent 8da2472bb4
commit d5d0fb95e2
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -444,6 +444,13 @@ relative to `org-directory', unless it is an absolute path."
(mathjax . t) (mathjax . t)
(variable . "revealjs-url=https://revealjs.com")))) (variable . "revealjs-url=https://revealjs.com"))))
(defadvice! +org--dont-trigger-save-hooks-on-export-a (orig-fn &rest args)
"`org-export-to-file' triggers save hooks, which may inadvertantly change
the exported output (i.e. formatters)."
:around #'org-export-to-file
(let (before-save-hook after-save-hook)
(apply orig-fn args)))
(defadvice! +org--fix-async-export-a (orig-fn &rest args) (defadvice! +org--fix-async-export-a (orig-fn &rest args)
:around #'org-export-to-file :around #'org-export-to-file
(if (not org-export-in-background) (if (not org-export-in-background)