Commit Graph

647 Commits

Author SHA1 Message Date
contrapunctus 6fb599104b Redesign API; revert sexp-read to earlier behaviour
sexp-read goes back to not splitting events, not even when they cross
the provided timestamps. Splitting events is left to data consuming
functions via events-maybe-split, since not all of them need it. (e.g.
history generation for tags/keys/values)

Created
filter-events-time
2020-05-31 03:23:54 +05:30
contrapunctus e9a9209067 Modify chronometrist-sexp-read to split day-crossing events 2020-05-31 00:09:43 +05:30
contrapunctus 39e2a04a25 Change key-values to use chronometrist-sexp-read
A lot of now-unnecessary reversing was removed.
2020-05-29 16:06:04 +05:30
contrapunctus cec9475a57 Change sexp-read to split events exceeding the given range
Create
ts->iso
filter-task-events

Update
events-maybe-split to use ts.el
active-time-one-day to use ts.el
day-start to use ts.el
midnight-spanning-p to use ts.el
statistics-count-average-time-spent to use filter-events-task

Move
day-start from events.el to time.el
midnight-spanning-p from time.el to events.el

Remove
task-events-in-day (repalced by filter-events-task)
2020-05-29 10:54:46 +05:30
contrapunctus 2bfa99d0d8 Rename sexp-between -> sexp-read, return all events by default 2020-05-28 08:47:17 +05:30
contrapunctus 812b664074 Reindent ecukes feature definition 2020-05-28 01:46:02 +05:30
contrapunctus 5c0add84db Merge branch 'dev' into parsimonious-reading 2020-05-25 03:06:16 +05:30
contrapunctus 13f66d2409 chronometrist-goals - pass minutes instead of seconds 2020-05-25 03:05:12 +05:30
contrapunctus e234ae5a03 Update docstring to reflect use of ts structs 2020-05-25 03:04:11 +05:30
contrapunctus fc050dea71 Merge branch 'dev' into parsimonious-reading 2020-05-24 02:13:19 +05:30
contrapunctus 868325c4db Fixed prefix arguments not working if point was on a button 2020-05-24 02:08:40 +05:30
contrapunctus 56c3c2b325 Merge branch 'dev' into parsimonious-reading 2020-05-24 00:01:39 +05:30
contrapunctus 146f21cc2c tags-history-populate - clarify comment and local variable name 2020-05-24 00:00:14 +05:30
contrapunctus 98107b1e36 Remove reference to removed local variable
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.
2020-05-23 20:30:53 +05:30
contrapunctus c6fb67f74e Resurrect chronometrist-interval
It was used in my configuration, and has the potential to be used in
the program, too.
2020-05-22 10:31:59 +05:30
contrapunctus fdd9cc4a2e chronometrist-report-entries - improve clarity 2020-05-22 09:58:20 +05:30
contrapunctus 7fac851f37 Merge branch 'dev' into parsimonious-reading 2020-05-22 01:16:27 +05:30
contrapunctus 3e90db9ac1 Add macro chronometrist-sexp-in-file 2020-05-22 01:14:29 +05:30
contrapunctus da552aa6ac Move source files to elisp/ 2020-05-22 01:13:52 +05:30
contrapunctus 4edb213326 chronometrist-sexp-query-till -> chronometrist-sexp-between
Implement correct behaviour (removing
chronometrist-common-plist-date-match-p), add tests, add to reference.
2020-05-21 13:37:57 +05:30
contrapunctus a3fca870e3 changelog - note use of ts.el 2020-05-21 09:26:54 +05:30
contrapunctus 422e60c621 Merge branch 'dev' into parsimonious-reading 2020-05-21 09:20:08 +05:30
contrapunctus fc867a4aec Merge branch 'use-ts.el' into dev 2020-05-21 09:13:37 +05:30
contrapunctus b5c5cfd4a2 Update function reference; remove unused functions
Removed
chronometrist-report-format-date
chronometrist-statistics-format-date
chronometrist-interval
2020-05-21 08:48:11 +05:30
contrapunctus b2c7d2763c Reindent cl-loop calls 2020-05-21 01:48:06 +05:30
contrapunctus d8f34d430b Update function reference and docstring
Also, add type information for chronometrist-day-start
2020-05-21 01:45:16 +05:30
contrapunctus 2a6829c0d3 Fix byte compiler errors; add tests for task-time-one-day 2020-05-21 01:44:11 +05:30
contrapunctus c190ced000 Replace time values with integer seconds
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.
2020-05-20 16:45:29 +05:30
contrapunctus 38eba669ec manual - convert time type table to Org tree 2020-05-20 03:25:42 +05:30
contrapunctus f80cbeaaa7 Remove non-user-facing uses of integer minutes as duration type
Remove
chronometrist-task-minutes-one-day
chronometrist-minutes-string

Rename
chronometrist-minutes->alert-string -> chronometrist-seconds->alert-string
2020-05-19 16:09:14 +05:30
contrapunctus 98627c12f6 Rename tests for renamed function iso-date->ts 2020-05-19 15:33:42 +05:30
contrapunctus 0c05c431f5 Remove unused function; update time format reference 2020-05-19 15:05:31 +05:30
contrapunctus 349a260089 Merge branch 'use-ts.el' of github.com:contrapunctus-1/chronometrist into use-ts.el 2020-05-18 04:16:00 +05:30
contrapunctus a09058dcfd Change return values of seconds-to-hms and format-time
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
2020-05-18 04:15:23 +05:30
contrapunctus 9c7128b1e9 Change return values of seconds-to-hms and format-time
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
2020-05-18 04:01:18 +05:30
contrapunctus 14337d5268 task-time-one-day - clarify code 2020-05-18 03:49:16 +05:30
contrapunctus b6c9337a42 Remove 3 unused functions
Removed
chronometrist-time->seconds
chronometrist-date->time
chronometrist-date-less-p
2020-05-18 00:18:47 +05:30
contrapunctus e04cb19be6 Fix previous/next scrolling bug introduced in 7bf6750 2020-05-17 23:58:07 +05:30
contrapunctus 3f2fc0f662 Remove 3 unused definitions 2020-05-17 22:17:26 +05:30
contrapunctus 99fab0f92e Migrate statistics to ts.el
Removed - chronometrist-calendrical->date
2020-05-17 22:01:00 +05:30
contrapunctus 7bf6750c21 Migrate report to use ts.el 2020-05-17 20:40:36 +05:30
contrapunctus d744268392 print-non-tabular, report-print-non-tabular - reindent code
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.
2020-05-17 16:50:28 +05:30
contrapunctus 99ee0acfc3 Fix task-events-in-day to work with TS
Changing chronometrist-date requires changing task-events-in-day,
because the latter expected "YYYY-MM-DD" and chronometrist-date was
used to provide that.
2020-05-17 14:13:30 +05:30
contrapunctus c85fab197b Merge branch 'dev' into use-ts.el 2020-05-17 12:55:38 +05:30
contrapunctus ff10ff9b32 Use cl-defun + default values where applicable 2020-05-17 12:17:51 +05:30
contrapunctus e7c0eb055d Rewrite chronometrist-date to use ts.el
Rename chronometrist-make-ts-date to chronometrist-iso-timestamp->ts
2020-05-17 10:40:51 +05:30
contrapunctus 93097a5a85 manual - remove recently removed unused function 2020-05-17 09:54:23 +05:30
contrapunctus fd4dc7008b Create make-ts-date
The tests for previous-week-start now pass.
2020-05-17 09:49:14 +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 321b8e07e4 Create function sexp-query-till
And consequently -
common-plist-date-match-p
timestamp-less-p
timestamp->iso-date.
2020-05-16 12:13:59 +05:30