Create on-file-change generic
This commit is contained in:
parent
083a2f4d8e
commit
3e7c41c9f7
|
@ -420,6 +420,9 @@ Hash table keys are ISO-8601 date strings. Hash table values are lists of record
|
|||
(cl-defgeneric chronometrist-list-records (backend)
|
||||
"Return all records in BACKEND as a list of plists, in reverse chronological order.")
|
||||
|
||||
(cl-defgeneric chronometrist-on-file-change (backend)
|
||||
"Function to be run when file for BACKEND changes.")
|
||||
|
||||
(defclass chronometrist-plist-backend (chronometrist-backend) ())
|
||||
|
||||
(add-to-list 'chronometrist-backends-alist
|
||||
|
|
|
@ -1035,6 +1035,11 @@ Hash table keys are ISO-8601 date strings. Hash table values are lists of record
|
|||
(cl-defgeneric chronometrist-list-records (backend)
|
||||
"Return all records in BACKEND as a list of plists, in reverse chronological order.")
|
||||
#+END_SRC
|
||||
**** on-file-change :generic:function:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(cl-defgeneric chronometrist-on-file-change (backend)
|
||||
"Function to be run when file for BACKEND changes.")
|
||||
#+END_SRC
|
||||
*** plist backend
|
||||
In this format, user data is stored as Elisp plists in a plain text file. A basic plist in this file looks like this -
|
||||
|
||||
|
|
Reference in New Issue