From d5d0fb95e2109451a357bd9af75469072c490e63 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 4 Jun 2020 23:48:16 -0400 Subject: [PATCH] Fix #3175: inhibit save hooks on org-export-to-file --- modules/lang/org/config.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 6016c1161..215ba857d 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -444,6 +444,13 @@ relative to `org-directory', unless it is an absolute path." (mathjax . t) (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) :around #'org-export-to-file (if (not org-export-in-background)