Commit Graph

43 Commits

Author SHA1 Message Date
contrapunctus
99fab0f92e Migrate statistics to ts.el
Removed - chronometrist-calendrical->date
2020-05-17 22:01:00 +05:30
contrapunctus
666d9e0726 Reimplement some functions using ts
Sadly, it didn't go so well - pretty challenging, lots of debugging,
and plenty of tests failing. Left them some feedback -
https://github.com/alphapapa/ts.el/issues/11
2020-05-16 21:40:20 +05:30
contrapunctus
958551d498 Address nearly all byte compiler warnings
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
2020-05-16 08:35:54 +05:30
contrapunctus
b62301e870 Fix recursive load errors and some byte compiler warnings
chronometrist-open-log, chronometrist-common-create-file, and
chronometrist-current-task have been moved from
chronometrist-common.el to chronometrist.el

Comment out unused function chronometrist-file-clean, removing
chronometrist-events.el's dependency on chronometrist-plist-pp.el.

In the reference, use "Keymap" for keymap variables.
2020-05-15 15:17:54 +05:30
contrapunctus
97dc94e70c Create chronometrist-sexp-events-populate
And clarify some docstrings in chronometrist-events.el
2020-05-15 13:15:09 +05:30
contrapunctus
9e88e71212 delete-list - move to sexp, rename to sexp-delete-list 2020-05-15 09:18:20 +05:30
contrapunctus
cc791cd61e MELPA - add license information to headers 2020-02-24 01:27:22 +05:30
contrapunctus
9ae39da05f Remove 2 more obsolete functions 2019-11-22 10:04:15 +05:30
contrapunctus
7443ac8cca Remove obsolete definitions 2019-11-22 10:04:15 +05:30
contrapunctus
921b22de0e Update function prefix 2019-11-22 10:04:15 +05:30
contrapunctus
d38e6c2030 Byte compiler - fix definition warnings 2019-11-22 10:04:15 +05:30
contrapunctus
59226f3a80 Byte compiler fixes - prefix cl-lib calls 2019-11-22 10:04:15 +05:30
contrapunctus
a0b31ddd47 Byte compiler fixes - suppress unused variable warnings 2019-11-22 10:04:15 +05:30
contrapunctus
4b853f84d4 Place provide declaration before file variables 2019-11-17 18:46:34 +05:30
contrapunctus
ab08671cfb Add headers 2019-11-05 07:11:10 +05:30
contrapunctus
4e89836aaa Fix checkdoc errors 2019-10-31 20:43:50 +05:30
contrapunctus
ff8a3279cc -query - check for specifiers only when provided 2019-10-31 18:02:28 +05:30
contrapunctus
d6b4f65783 Bundle plist-pp 2019-10-25 13:15:55 +05:30
contrapunctus
798dd7ae21 -query - add EXCEPT keyword 2019-10-07 13:10:05 +05:30
contrapunctus
ae1f8133b4 -events - update docstring, remove redundant provide 2019-09-17 07:52:06 +05:30
contrapunctus
3c45f2b9ac -events-query - implement list-of-keywords value for specifiers 2019-09-17 07:51:16 +05:30
contrapunctus
0fa8729fff Add -events-query function 2019-09-14 00:57:59 +05:30
contrapunctus
71fcc2eefd -events-populate - return number of s-expressions read 2019-09-13 01:08:13 +05:30
contrapunctus
9e9b165558 Get chronometrist-report to a basic working state
Rename -
-total-time-one-day -> -active-time-one-day
-events-midnight-spanning-p -> -midnight-spanning-p
Argument names to better reflect type

Move -
-statistics-count-active-days to -queries.el
-task-events-in-day to -queries.el

Remove -date-op

-events->time-list now returns lists of start-stop times, making the
call to -partition in -time-list->sum-of-intervals unnecessary

Fix -midnight-spanning-p - earlier, it was using the start of the
_first_ day as the first split event's stop time, resulting in a
negative time interval and (wildly) inaccurate interval totals.
2019-09-12 15:18:03 +05:30
contrapunctus
228b2ab753 Go back to using dates as hash table keys for performance
This time as "YYYY-MM-DD" instead of '(YEAR MONTH DAY). See
"Optimization" in doc/new-format.md for more information.
2019-09-08 21:33:09 +05:30
contrapunctus
fb0d2da886 Get interactive interface to basic working state
* rename "project" -> "task" -
  chronometrist-project-time-one-day -> chronometrist-task-time-one-day
  chronometrist-project-events-in-day -> chronometrist-task-events-in-day
  local variables have been renamed

* optimization - update chronometrist--task-list only when buffer is
  visible, to reduce post-file-change load

* -events-populate - fix bug which resulted in the last expression
  not being added

* -task-time-one-day, -task-events-in-day, -events->time-list have
  been updated to work with plists

Auto-refresh is currently broken.
2019-09-08 12:31:42 +05:30
contrapunctus
9ed53c3e1b Implement chronometrist--task-list 2019-09-07 22:43:05 +05:30
contrapunctus
c3dd0738a0 Split events during reading, instead of modifying the file
-populate now also returns a more meaningful value.
2019-09-07 22:14:10 +05:30
contrapunctus
2b19b9f30e Make interactive clocking in/out work
* -sexp.el - remove old multiple backends code, rename
  -in-sexp/-out-sexp to -in/-out

* -time.el - create -current-time-iso8601

* -events.el - -file-clean won't try to check an interval which
  doesn't have a :stop time (fixes error with current event)

* chronometrist.el - change quite a few uses of "project" to
  "task" (including function and argument names). Make -file-clean run
  before -events-populate. Replace calls to timeclock-in/out with
  chronometrist-in/out.
2019-09-07 09:43:03 +05:30
contrapunctus
05af9d05ff Implement in-file fixing of midnight-spanning events 2019-09-07 01:25:35 +05:30
contrapunctus
d5a0e1c17e Migrate chronometrist-populate to s-expression format
Wow, how much shorter is that parsing code? :D
2019-09-05 22:48:25 +05:30
contrapunctus
9a04caa709 Remove unused local variable 2019-08-17 10:24:34 +05:30
contrapunctus
639dba113e Enable lexical binding 2019-08-09 11:49:26 +05:30
contrapunctus
10a20aa627 Fix refresh bugs 2019-08-08 13:49:06 +05:30
contrapunctus
d2340877b7 -events - fix checkdoc errors 2019-08-02 12:28:44 +05:30
contrapunctus
69c173ed55 Fix critical bug in v26
hash-table-keys changed the order of the values it returned, and in
the absence of any sorting, instead of the latest date, we were
getting the oldest.
2019-08-01 20:04:10 +05:30
Kashish Sharma
95097819f4 Load subr-x 2019-04-16 22:04:28 +05:30
Kashish Sharma
a3dac8f4ed -diary-view/-events - fix bug with ongoing events 2019-02-09 02:00:47 +05:30
Kashish Sharma
2e6d485405 -events-clean - fix hash table append fail 2019-01-17 22:50:47 +05:30
Kashish Sharma
3daab2eabc -events - remove unnecessary whitespace 2019-01-17 01:49:20 +05:30
Kashish Sharma
bf5a082615 -events-clean - handle case of incomplete last entry 2019-01-17 01:48:33 +05:30
Kashish Sharma
571a66f486 -statistics - display weekly data 2018-11-02 06:28:54 +05:30
Kashish Sharma
c0636b2f41 Move events-related code to -events.el 2018-11-01 12:17:25 +05:30