Make description consistent
This commit is contained in:
parent
bcff5690fc
commit
42cf241587
|
@ -1,4 +1,4 @@
|
|||
;;; chronometrist.el --- A time tracker with a nice interface -*- lexical-binding: t; -*-
|
||||
;;; chronometrist.el --- Friendly and powerful time tracker and analyzer -*- lexical-binding: t; -*-
|
||||
|
||||
;; Author: contrapunctus <xmpp:contrapunctus@jabjab.de>
|
||||
;; Maintainer: contrapunctus <xmpp:contrapunctus@jabjab.de>
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; A time tracker in Emacs with a nice interface
|
||||
;; Friendly and powerful time tracker and analyzer.
|
||||
|
||||
;; Largely modelled after the Android application, [A Time Tracker](https://github.com/netmackan/ATimeTracker)
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#+TITLE: Chronometrist - an extensible time tracker for Emacs
|
||||
#+SUBTITLE: Developer manual and program source
|
||||
#+TITLE: Chronometrist
|
||||
#+SUBTITLE: Friendly and powerful personal time tracker and analyzer for Emacs
|
||||
#+DESCRIPTION: Developer manual and program source
|
||||
#+AUTHOR: contrapunctus
|
||||
#+TODO: TODO TEST WIP EXTEND CLEANUP FIXME HACK REVIEW |
|
||||
#+PROPERTY: header-args :tangle yes :load yes :comments link
|
||||
|
@ -67,15 +68,15 @@ Thus, I have considered various optimization strategies, and so far implemented
|
|||
|
||||
*** Prevent excess creation of file watchers
|
||||
One of the earliest 'optimizations' of great importance turned out to simply be a bug - turns out, if you run an identical call to [[elisp:(describe-function 'file-notify-add-watch)][=file-notify-add-watch=]] twice, you create /two/ file watchers and your callback will be called /twice./ We were creating a file watcher /each time the =chronometrist= command was run./ 🤦 This was causing humongous slowdowns each time the file changed. 😅
|
||||
+ It was fixed in v0.2.2 by making the watch creation conditional, using [[* fs-watch][=chronometrist--fs-watch=]] to store the watch object.
|
||||
+ It was fixed in v0.2.2 by making the watch creation conditional, using =chronometrist--fs-watch= to store the watch object.
|
||||
|
||||
*** Preserve hash table state for some commands
|
||||
NOTE - this has been replaced with a more general optimization - see next section.
|
||||
|
||||
The next one was released in v0.5. Till then, any time the [[* chronometrist-file][=chronometrist-file=]] was modified, we'd clear the [[* chronometrist-events][=chronometrist-events=]] hash table and read data into it again. The reading itself is nearly-instant, even with ~2 years' worth of data [fn:2] (it uses Emacs' [[elisp:(describe-function 'read)][=read=]], after all), but the splitting of [[#explanation-midnight-spanning-intervals][midnight-spanning events]] is the real performance killer.
|
||||
The next one was released in v0.5. Till then, any time the [[* chronometrist-file][=chronometrist-file=]] was modified, we'd clear the =chronometrist-events= hash table and read data into it again. The reading itself is nearly-instant, even with ~2 years' worth of data [fn:2] (it uses Emacs' [[elisp:(describe-function 'read)][=read=]], after all), but the splitting of [[#explanation-midnight-spanning-intervals][midnight-spanning events]] is the real performance killer.
|
||||
|
||||
After the optimization...
|
||||
1. Two backend functions ([[* new][=chronometrist-sexp-new=]] and [[* replace-last][=chronometrist-sexp-replace-last=]]) were modified to set a flag (=chronometrist--inhibit-read-p=) before saving the file.
|
||||
1. Two backend functions (=chronometrist-sexp-new= and =chronometrist-sexp-replace-last=) were modified to set a flag (=chronometrist--inhibit-read-p=) before saving the file.
|
||||
2. If this flag is non-nil, [[* refresh-file][=chronometrist-refresh-file=]] skips the expensive calls to =chronometrist-events-populate=, =chronometrist-tasks-from-table=, and =chronometrist-tags-history-populate=, and resets the flag.
|
||||
3. Instead, the aforementioned backend functions modify the relevant variables - =chronometrist-events=, =chronometrist-task-list=, and =chronometrist-tags-history= - via...
|
||||
* =chronometrist-events-add= / =chronometrist-events-replace-last=
|
||||
|
@ -384,7 +385,7 @@ Once, for sake of neatness, I made the value of =Package-Requires:= multiline -
|
|||
But I discovered that if I do that, =package-lint= says - =error: Couldn't parse "Package-Requires" header: End of file during parsing=.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :comments no
|
||||
;;; chronometrist.el --- A time tracker with a nice interface -*- lexical-binding: t; -*-
|
||||
;;; chronometrist.el --- Friendly and powerful personal time tracker and analyzer -*- lexical-binding: t; -*-
|
||||
|
||||
;; Author: contrapunctus <xmpp:contrapunctus@jabjab.de>
|
||||
;; Maintainer: contrapunctus <xmpp:contrapunctus@jabjab.de>
|
||||
|
@ -408,7 +409,7 @@ But I discovered that if I do that, =package-lint= says - =error: Couldn't parse
|
|||
#+BEGIN_SRC emacs-lisp :comments no
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; A time tracker in Emacs with a nice interface
|
||||
;; Friendly and powerful personal time tracker and analyzer.
|
||||
|
||||
;; Largely modelled after the Android application, [A Time Tracker](https://github.com/netmackan/ATimeTracker)
|
||||
|
||||
|
@ -512,7 +513,7 @@ If FIRSTONLY is non-nil, return only the first keybinding found."
|
|||
(apply #'concat))))
|
||||
#+END_SRC
|
||||
*** day-start-time :custom:variable:
|
||||
[[* events-maybe-split][=chronometrist-events-maybe-split=]] refers to this, but I'm not sure this has the desired effect at the moment—haven't even tried using it.
|
||||
=chronometrist-events-maybe-split= refers to this, but I'm not sure this has the desired effect at the moment—haven't even tried using it.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defcustom chronometrist-day-start-time "00:00:00"
|
||||
"The time at which a day is considered to start, in \"HH:MM:SS\".
|
||||
|
@ -2801,7 +2802,7 @@ Return value is either a list in the form
|
|||
***** replace-last :writer:method:
|
||||
=chronometrist-replace-last= is what is used for clocking out, so we split midnight-spanning intervals in this operation.
|
||||
|
||||
We apply the same hack as in the [[<<hack-note-plist-group-insert>>][insert]] method, removing and inserting the plist group instead of just the specific plist, to avoid having to update the pretty printer.
|
||||
We apply the same hack as in the [[hack-note-plist-group-insert][insert]] method, removing and inserting the plist group instead of just the specific plist, to avoid having to update the pretty printer.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(cl-defmethod chronometrist-replace-last ((backend chronometrist-plist-group-backend) plist)
|
||||
|
@ -4623,9 +4624,13 @@ Return value is a list as specified by `tabulated-list-entries'."
|
|||
;;; chronometrist.el ends here
|
||||
#+END_SRC
|
||||
|
||||
** Local variables :NOEXPORT:
|
||||
* Local variables :NOEXPORT:
|
||||
Evaluate this to be able to insert the package prefix via =nameless-insert-name=, at the cost of having all =nameless-aliases= break (= less readable code).
|
||||
|
||||
#+BEGIN_SRC emacs-lisp :load no :tangle no
|
||||
(setq nameless-current-name "chronometrist")
|
||||
#+END_SRC
|
||||
|
||||
# Local Variables:
|
||||
# eval: (when (package-installed-p 'literate-elisp) (require 'literate-elisp) (literate-elisp-load (buffer-file-name)))
|
||||
# End:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#+TITLE: Chronometrist - an extensible time tracker for Emacs
|
||||
#+SUBTITLE: User Manual
|
||||
#+SUBTITLE: Friendly and powerful personal time tracker and analyzer for Emacs
|
||||
#+DESCRIPTION: User Manual
|
||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style.css" />
|
||||
|
||||
#+BEGIN_EXPORT html
|
||||
|
|
Reference in New Issue