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

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

[elpa] externals/org 8821ff5811 09/31: org-persist-read: Do not try to r


From: ELPA Syncer
Subject: [elpa] externals/org 8821ff5811 09/31: org-persist-read: Do not try to read non-existing containers
Date: Sat, 29 Jan 2022 04:58:02 -0500 (EST)

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

    org-persist-read: Do not try to read non-existing containers
---
 lisp/org-persist.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 6fbf67fe67..c4c185dc1c 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -649,8 +649,12 @@ A buffer is treated as (:buffer ASSOCIATED).
 A string is treated as (:file ASSOCIATED)."
   (setq associated (org-persist--normalize-associated associated))
   (setq container (org-persist--normalize-container container))
-  (let* ((collection (org-persist--get-collection container associated))
-         (persist-file (org-file-name-concat org-persist-directory (plist-get 
collection :persist-file)))
+  (let* ((collection (org-persist--find-index `(:container ,container 
:associated ,associated)))
+         (persist-file
+          (when collection
+            (org-file-name-concat
+             org-persist-directory
+             (plist-get collection :persist-file))))
          (data nil))
     (when (and collection
                (file-exists-p persist-file)



reply via email to

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