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

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

[elpa] externals-release/org b71474f: lisp/org.el: (org-save-all-org-buf


From: ELPA Syncer
Subject: [elpa] externals-release/org b71474f: lisp/org.el: (org-save-all-org-buffers): Prevent `org-mode' reload
Date: Sat, 9 Oct 2021 16:57:17 -0400 (EDT)

branch: externals-release/org
commit b71474ff7fff75947c861b405a3cf4f22a4460c2
Author: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    lisp/org.el: (org-save-all-org-buffers): Prevent `org-mode' reload
    
    * lisp/org.el: (org-save-all-org-buffers): Ensure `save-some-buffers' PRED 
returns boolean.
    
    As of this upstream commit:
    
    
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=a9ad3d477441feefa3bf6107d58281cb64e0e78a
    
    `save-some-buffers' will call its PRED argument if it returns a function.
    Since (derived-mode-p 'org-mode) returns the symbol org-mode,
    and org-mode is a function, org-mode is reloaded in modified Org
    buffers when calling `org-save-all-org-buffers'. Among other
    undesirable behavior, this will cause the buffer's visibility to be
    reset to its initial visibility.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index bc0ea24..c2a37e6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15362,7 +15362,7 @@ The value is a list, with zero or more of the symbols 
`effort', `appt',
   "Save all Org buffers without user confirmation."
   (interactive)
   (message "Saving all Org buffers...")
-  (save-some-buffers t (lambda () (derived-mode-p 'org-mode)))
+  (save-some-buffers t (lambda () (and (derived-mode-p 'org-mode) t)))
   (when (featurep 'org-id) (org-id-locations-save))
   (message "Saving all Org buffers... done"))
 



reply via email to

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