emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org aa90e5b59c 03/13: org-export-with-buffer-copy: Avoi


From: ELPA Syncer
Subject: [elpa] externals/org aa90e5b59c 03/13: org-export-with-buffer-copy: Avoid all the hooks, not just `org-mode-hook'
Date: Fri, 7 Oct 2022 01:57:50 -0400 (EDT)

branch: externals/org
commit aa90e5b59cc0fe41072cd6f78968e0b8d5ac6939
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-export-with-buffer-copy: Avoid all the hooks, not just `org-mode-hook'
    
    * lisp/ox.el (org-export--generate-copy-script): Use
    `delay-mode-hooks' to disable all the hooks to be executed instead of
    only `org-mode-hook'.
    
    Reported-by: Rudolf Adamkovič <salutis@me.com>
    Link: https://list.orgmode.org/m2zgef774u.fsf@me.com/T/#t
---
 lisp/ox.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 37cee1674c..39490086ca 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2622,9 +2622,10 @@ The function assumes BUFFER's major mode is `org-mode'."
             ov-set)))
       (lambda ()
        (let ((inhibit-modification-hooks t))
-         ;; Set major mode. Ignore `org-mode-hook' as it has been run
-         ;; already in BUFFER.
-         (let ((org-mode-hook nil) (org-inhibit-startup t)) (org-mode))
+         ;; Set major mode. Ignore `org-mode-hook' and other hooks as
+         ;; they have been run already in BUFFER.
+          (delay-mode-hooks
+            (let ((org-inhibit-startup t)) (org-mode)))
          ;; Copy specific buffer local variables and variables set
          ;; through BIND keywords.
          (pcase-dolist (`(,var . ,val) varvals)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]