We now avoid running chronometrist-tags-history-populate for the
chronometrist-sexp-new and the chronometrist-sexp-replace-last
operations.
Clocking in/out is nearly instant now!
We now avoid running chronometrist-tasks-from-table for the
chronometrist-sexp-new and the chronometrist-sexp-replace-last
operations.
Hurray. Clocking in/out is tangibly faster now.
Namely, don't run it when appending an s-expression to the file, nor
when replacing the last s-expression. Instead, we modify the hash
table itself.
I wanted the code which sets chronometrist--inhibit-read-p to t to
also reset it to nil (ideally via `let`), but file watchers seem to
run _after_ the form modifying the file returns. (i.e. after the scope
of `let` ends and the global bindings are restored)
Still uncertain if this really has sped things up, though.
This was causing chronometrist-sexp-last to return nil, and the
ignore-errors was, well, ignoring-errors, resulting in all sorts of
mysterious bugs.
Added a test to prevent it from happening again.
1. chronometrist-events->time-list -> chronometrist-events->ts-pairs,
now returns a list of ts pairs. Rewritten using cl-loop.
2. chronometrist-time-list->sum-of-intervals ->
chronometrist-ts-pairs->durations, now returns a list of durations in
integer seconds.
3. A critical bug in chronometrist-iso-timestamp->ts was discovered -
we were passing the output of encode-time (via
parse-iso8601-time-string) to (make-ts :unix ...) - the latter expects
a number, not a list.
4. Both chronometrist-task-time-one-day and
chronometrist-events->ts-pairs were checking if a task was still
ongoing. Removed the redundant checking from the former.
5. Updated docstring of chronometrist-active-time-one-day
6. chronometrist-statistics-count-average-time-spent rewritten using
cl-loop
Also, when trying to write tests, I realized that
chronometrist-events-clean has long been removed. Removed a reference
to it from the manual and a docstring.
seconds-to-hms now returns a list instead of a vector.
chronometrist-format-time now takes integer seconds instead of lists
or vectors.
manual - remove types which are no longer used
Removed unused functions
chronometrist-time-interval-span-midnight?
chronometrist-time-add
seconds-to-hms now returns a list instead of a vector.
chronometrist-format-time now takes integer seconds instead of lists
or vectors.
manual - remove types which are no longer used
Removed unused functions
chronometrist-time-interval-span-midnight?
chronometrist-time-add
It was much too spaced out, for no benefit I could perceive.
Also, we remove the interactive spec from query-stop. There's no need
for it to appear in the execute-extended-command menu.
Changing chronometrist-date requires changing task-events-in-day,
because the latter expected "YYYY-MM-DD" and chronometrist-date was
used to provide that.
For the time being, we use a consistent pattern of packages requiring
sexp.el instead of the other way round.
chronometrist-current-task has been moved back to chronometrist-common