forked from mirrors/org-mode
org-persist: Fix :last-access being set on every write
* lisp/org-persist.el (org-persist-write:generic): Do not set :last-access on write, unless writing first time. Otherwise, :last-access may never trigger expiration.
This commit is contained in:
parent
eaf274909f
commit
9e42842a82
|
@ -759,8 +759,9 @@ COLLECTION is the plist holding data collection."
|
|||
"Write CONTAINER in COLLECTION."
|
||||
`(let* ((c (org-persist--normalize-container ,container))
|
||||
(write-func-symbol (intern (format "org-persist-write:%s" (car c)))))
|
||||
(unless (plist-get ,collection :last-access)
|
||||
(setf ,collection (plist-put ,collection :last-access (float-time)))
|
||||
(setf ,collection (plist-put ,collection :last-access-hr (format-time-string "%FT%T%z" (float-time))))
|
||||
(setf ,collection (plist-put ,collection :last-access-hr (format-time-string "%FT%T%z" (float-time)))))
|
||||
(unless (fboundp write-func-symbol)
|
||||
(error "org-persist: Write function %s not defined"
|
||||
write-func-symbol))
|
||||
|
|
Loading…
Reference in New Issue