summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-03-01 08:30:44 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2013-03-01 08:31:39 +0100
commitce3e6555d3e24a6bf75d34fdf8a2bb67bfee3e4e (patch)
tree78a6f04a8cc8533930c63c7e0ad1be86b8239594
parent7d48126665fe00ccc6bae2e95dd4df29cdfb2fa1 (diff)
downloadorg-mode-ce3e6555d3e24a6bf75d34fdf8a2bb67bfee3e4e.tar.gz
ox: Ignore `org-mode-hook' and `kill-emacs-hook' in asynchronous export
* lisp/ox.el (org-export-async-start): Ignore `org-mode-hook' and `kill-emacs-hook'. The first one has been run in the original buffer. The second is not necessary and can pollute output to a temporary buffer (e.g. with `org-clock-persistence-insinuate').
-rw-r--r--lisp/ox.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/ox.el b/lisp/ox.el
index 3ea34de..dce8046 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5091,6 +5091,10 @@ and
"%S"
`(with-temp-buffer
,(when org-export-async-debug '(setq debug-on-error t))
+ ;; Ignore `org-mode-hook' as it has been run already
+ ;; in the original buffer. Ignore `kill-emacs-hook'
+ ;; as we need a truly non-interactive process.
+ (setq org-mode-hook nil kill-emacs-hook nil)
;; Initialize `org-mode' and export framework in the
;; external process.
(org-mode)