0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 14:32:52 +00:00

org-persist: Ensure index instantiated before read

* lisp/org-persist.el (org-persist-read): If the index is empty at the
start of `org-persist-read', load it before continuing.
This commit is contained in:
Timothy 2022-12-10 23:58:55 +08:00 committed by Ihor Radchenko
parent 88329143c8
commit 6a126e40a7
No known key found for this signature in database
GPG key ID: 6470762A7DA11D8B

View file

@ -771,6 +771,7 @@ ASSOCIATED can be a plist, a buffer, or a string.
A buffer is treated as (:buffer ASSOCIATED).
A string is treated as (:file ASSOCIATED).
When LOAD? is non-nil, load the data instead of reading."
(unless org-persist--index (org-persist--load-index))
(setq associated (org-persist--normalize-associated associated))
(setq container (org-persist--normalize-container container))
(unless (and org-persist-disable-when-emacs-Q