diff --git a/elisp/chronometrist.el b/elisp/chronometrist.el index e7d9be1..4909d5a 100644 --- a/elisp/chronometrist.el +++ b/elisp/chronometrist.el @@ -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 diff --git a/elisp/chronometrist.org b/elisp/chronometrist.org index 05b1526..292df3b 100644 --- a/elisp/chronometrist.org +++ b/elisp/chronometrist.org @@ -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 -