org-persist-read: Do not try to read non-existing containers
This commit is contained in:
parent
1084566322
commit
8821ff5811
|
@ -649,8 +649,12 @@ A buffer is treated as (:buffer ASSOCIATED).
|
||||||
A string is treated as (:file ASSOCIATED)."
|
A string is treated as (:file ASSOCIATED)."
|
||||||
(setq associated (org-persist--normalize-associated associated))
|
(setq associated (org-persist--normalize-associated associated))
|
||||||
(setq container (org-persist--normalize-container container))
|
(setq container (org-persist--normalize-container container))
|
||||||
(let* ((collection (org-persist--get-collection container associated))
|
(let* ((collection (org-persist--find-index `(:container ,container :associated ,associated)))
|
||||||
(persist-file (org-file-name-concat org-persist-directory (plist-get collection :persist-file)))
|
(persist-file
|
||||||
|
(when collection
|
||||||
|
(org-file-name-concat
|
||||||
|
org-persist-directory
|
||||||
|
(plist-get collection :persist-file))))
|
||||||
(data nil))
|
(data nil))
|
||||||
(when (and collection
|
(when (and collection
|
||||||
(file-exists-p persist-file)
|
(file-exists-p persist-file)
|
||||||
|
|
Loading…
Reference in New Issue