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

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

[elpa] externals/org ec6d1df 2/2: lisp/ox.el (org-export-to-file): Don't


From: ELPA Syncer
Subject: [elpa] externals/org ec6d1df 2/2: lisp/ox.el (org-export-to-file): Don't load the major mode
Date: Mon, 3 May 2021 13:57:19 -0400 (EDT)

branch: externals/org
commit ec6d1df9bc8967e1db14bbd3c90828c71a6a8e0e
Author: TEC <tec@tecosaur.com>
Commit: Bastien <bzg@gnu.org>

    lisp/ox.el (org-export-to-file): Don't load the major mode
    
    * lisp/ox.el (org-export-to-file): Don't load the major mode.
    
    Prior to this, when `org-export-to-file' was called it activated the
    major mode for that file type based on `auto-mode-alist'.  This can be
    mildly annoying in various ways as loading the major mode (1) makes
    the export take longer, (2) can produce unwanted "noise" while
    initialising, namely warnings and errors related to the mode itself,
    (3) can produce spurious files like an .auctex-auto folder.  By
    locally binding `auto-mode-alist' to nil, all of these undesirable
    behaviours can be avoided.
    
    Link: https://orgmode.org/list/87lfa3fips.fsf@gmail.com/
---
 lisp/ox.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 8c0252a..6ec9b62 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6394,7 +6394,8 @@ or FILE."
   (declare (indent 2))
   (if (not (file-writable-p file)) (error "Output file not writable")
     (let ((ext-plist (org-combine-plists `(:output-file ,file) ext-plist))
-         (encoding (or org-export-coding-system buffer-file-coding-system)))
+         (encoding (or org-export-coding-system buffer-file-coding-system))
+          auto-mode-alist)
       (if async
           (org-export-async-start
              (lambda (file)



reply via email to

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