forked from mirrors/org-mode
Merge branch 'bugfix'
* lisp/org-persist.el (org-persist--storage-version): Bump further to distinguish cache layouts on bugfix vs. main.
This commit is contained in:
commit
5804176149
|
@ -256,7 +256,7 @@
|
||||||
(declare-function org-at-heading-p "org" (&optional invisible-not-ok))
|
(declare-function org-at-heading-p "org" (&optional invisible-not-ok))
|
||||||
|
|
||||||
|
|
||||||
(defconst org-persist--storage-version "3.0"
|
(defconst org-persist--storage-version "3.2"
|
||||||
"Persistent storage layout version.")
|
"Persistent storage layout version.")
|
||||||
|
|
||||||
(defgroup org-persist nil
|
(defgroup org-persist nil
|
||||||
|
@ -532,25 +532,27 @@ Return PLIST."
|
||||||
(when key (remhash (cons cont (list :key key)) org-persist--index-hash))))
|
(when key (remhash (cons cont (list :key key)) org-persist--index-hash))))
|
||||||
(setq org-persist--index (delq existing org-persist--index)))))
|
(setq org-persist--index (delq existing org-persist--index)))))
|
||||||
|
|
||||||
(defun org-persist--get-collection (container &optional associated &rest misc)
|
(defun org-persist--get-collection (container &optional associated misc)
|
||||||
"Return or create collection used to store CONTAINER for ASSOCIATED.
|
"Return or create collection used to store CONTAINER for ASSOCIATED.
|
||||||
When ASSOCIATED is nil, it is a global CONTAINER.
|
When ASSOCIATED is nil, it is a global CONTAINER.
|
||||||
ASSOCIATED can also be a (:buffer buffer) or buffer, (:file file-path)
|
ASSOCIATED can also be a (:buffer buffer) or buffer, (:file file-path)
|
||||||
or file-path, (:inode inode), (:hash hash), or or (:key key).
|
or file-path, (:inode inode), (:hash hash), or or (:key key).
|
||||||
MISC, if non-nil will be appended to the collection."
|
MISC, if non-nil will be appended to the collection. It must be a plist."
|
||||||
(unless (and (listp container) (listp (car container)))
|
(unless (and (listp container) (listp (car container)))
|
||||||
(setq container (list container)))
|
(setq container (list container)))
|
||||||
(setq associated (org-persist--normalize-associated associated))
|
(setq associated (org-persist--normalize-associated associated))
|
||||||
(unless (equal misc '(nil))
|
(when (and misc (or (not (listp misc)) (= 1 (% (length misc) 2))))
|
||||||
(setq associated (append associated misc)))
|
(error "org-persist: Not a plist: %S" misc))
|
||||||
(or (org-persist--find-index
|
(or (org-persist--find-index
|
||||||
`( :container ,(org-persist--normalize-container container)
|
`( :container ,(org-persist--normalize-container container)
|
||||||
:associated ,associated))
|
:associated ,associated))
|
||||||
(org-persist--add-to-index
|
(org-persist--add-to-index
|
||||||
|
(nconc
|
||||||
(list :container (org-persist--normalize-container container)
|
(list :container (org-persist--normalize-container container)
|
||||||
:persist-file
|
:persist-file
|
||||||
(replace-regexp-in-string "^.." "\\&/" (org-id-uuid))
|
(replace-regexp-in-string "^.." "\\&/" (org-id-uuid))
|
||||||
:associated associated))))
|
:associated associated)
|
||||||
|
misc))))
|
||||||
|
|
||||||
;;;; Reading container data.
|
;;;; Reading container data.
|
||||||
|
|
||||||
|
@ -878,7 +880,8 @@ last access, or a function accepting a single argument - collection.
|
||||||
EXPIRY key has no effect when INHERIT is non-nil.
|
EXPIRY key has no effect when INHERIT is non-nil.
|
||||||
Optional key WRITE-IMMEDIATELY controls whether to save the container
|
Optional key WRITE-IMMEDIATELY controls whether to save the container
|
||||||
data immediately.
|
data immediately.
|
||||||
MISC will be appended to CONTAINER.
|
MISC will be appended to the collection. It must be alternating :KEY
|
||||||
|
VALUE pairs.
|
||||||
When WRITE-IMMEDIATELY is non-nil, the return value will be the same
|
When WRITE-IMMEDIATELY is non-nil, the return value will be the same
|
||||||
with `org-persist-write'."
|
with `org-persist-write'."
|
||||||
(unless org-persist--index (org-persist--load-index))
|
(unless org-persist--index (org-persist--load-index))
|
||||||
|
|
Loading…
Reference in a new issue