Update call site for latest-date-records

This commit is contained in:
contrapunctus 2022-02-15 20:41:01 +05:30
parent bf40c72250
commit d1107a50e1
2 changed files with 8 additions and 6 deletions

View File

@ -1802,9 +1802,10 @@ Return value is either a list in the form
"Function run when a new plist-group is added at the end of a
`chronometrist-plist-group-backend' file."
(with-slots (hash-table) backend
(-let [(date plist) (chronometrist-latest-date-records backend)]
(puthash date plist hash-table)
(chronometrist-add-to-task-list (plist-get plist :name) backend))))
(-let* (((record &as date . rest) (chronometrist-latest-date-records backend))
((interval) (chronometrist-record-intervals record)))
(puthash date rest hash-table)
(chronometrist-add-to-task-list (plist-get interval :name) backend))))
;; on-add:1 ends here
;; [[file:chronometrist.org::*on-modify][on-modify:1]]

View File

@ -2802,9 +2802,10 @@ Return value is either a list in the form
"Function run when a new plist-group is added at the end of a
`chronometrist-plist-group-backend' file."
(with-slots (hash-table) backend
(-let [(date plist) (chronometrist-latest-date-records backend)]
(puthash date plist hash-table)
(chronometrist-add-to-task-list (plist-get plist :name) backend))))
(-let* (((record &as date . rest) (chronometrist-latest-date-records backend))
((interval) (chronometrist-record-intervals record)))
(puthash date rest hash-table)
(chronometrist-add-to-task-list (plist-get interval :name) backend))))
#+END_SRC
**** on-modify :writer:method: