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

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

[elpa] externals/org e11073d17d: org-persist-gc: GC collections without


From: ELPA Syncer
Subject: [elpa] externals/org e11073d17d: org-persist-gc: GC collections without persist file
Date: Wed, 3 May 2023 06:59:58 -0400 (EDT)

branch: externals/org
commit e11073d17dd65908642268146858c6559f18367d
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    org-persist-gc: GC collections without persist file
    
    * lisp/org-persist.el (org-persist-gc): Do not store collections that
    lack persist file.  Such collection may emerge, for example, when
    writing fails or gets blocked for some reason (in
    `org-persist-before-write-hook' or when associated with encrypted
    file).
    
    Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
    Link: 
https://orgmode.org/list/CAM9ALR_F4gjWxOVh_Eq14NOC9nF6g0Cv1jAKb=p4FjPvjqSkWQ@mail.gmail.com
---
 lisp/org-persist.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index d8b7dc4a1a..bba39d8d09 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -1210,7 +1210,8 @@ Also, remove containers associated with non-existing 
files."
               (setq expired? t)))
           (if expired?
               (org-persist--gc-persist-file persist-file)
-            (push collection new-index)
+            (when (file-exists-p persist-file)
+              (push collection new-index))
             (dolist (container (plist-get collection :container))
               (dolist (associated-file
                        (org-persist-associated-files:generic



reply via email to

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