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

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

[elpa] externals/org 5abd149 2/2: org-persist-write: Do not try to write


From: ELPA Syncer
Subject: [elpa] externals/org 5abd149 2/2: org-persist-write: Do not try to write cache when killing indirect buffer
Date: Wed, 27 Oct 2021 21:57:34 -0400 (EDT)

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

    org-persist-write: Do not try to write cache when killing indirect buffer
---
 lisp/org-persist.el | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 858f175..47a31e0 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -207,16 +207,16 @@ When BUFFER is `all', unregister VAR in all buffers."
 
 (defun org-persist-write-all (&optional buffer)
   "Save all the persistent data."
-  (dolist (index org-persist--index)
-    (when (or (not (plist-get index :path))
-              (and (get-file-buffer (plist-get index :path))
-                   (or (not buffer)
-                       (equal (buffer-file-name (or (buffer-base-buffer buffer)
-                                                    buffer))
-                              (plist-get index :path)))))
-      (org-persist-write (plist-get index :variable)
-              (when (plist-get index :path)
-                (get-file-buffer (plist-get index :path)))))))
+  (unless (and buffer (not (buffer-file-name buffer)))
+    (dolist (index org-persist--index)
+      (when (or (not (plist-get index :path))
+                (and (get-file-buffer (plist-get index :path))
+                     (or (not buffer)
+                         (equal (buffer-file-name buffer)
+                                (plist-get index :path)))))
+        (org-persist-write (plist-get index :variable)
+                (when (plist-get index :path)
+                  (get-file-buffer (plist-get index :path))))))))
 
 (defun org-persist-write-all-buffer ()
   "Call `org-persist-write-all' in current buffer."



reply via email to

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