contrapunctus
1bd3c16929
Rename reset-internal -> reset-backend
2022-01-03 14:07:45 +05:30
contrapunctus
df00031285
Remove references to files from protocol
2022-01-03 03:20:24 +05:30
contrapunctus
5d5b423c59
Implement multi-backend tests
...
Reorganize plist backend methods
Address some failing tests for plist backend methods
2022-01-03 02:11:49 +05:30
contrapunctus
7ce9f8bf2d
Move create-file earlier in the protocol
2021-12-27 14:03:14 +05:30
contrapunctus
e031d43f24
Add error-checking and return values
2021-12-27 14:02:53 +05:30
contrapunctus
0fb0c6d0d6
Specify return value in protocol and update behavior
2021-12-26 19:36:44 +05:30
contrapunctus
bd4680fc04
Return non-nil if create-file succeeds
2021-12-23 20:33:52 +05:30
contrapunctus
a41662236f
Replace `cl-assert` with `error`
...
A failed `cl-assert` does not pass a `should-error` test.
2021-12-18 15:02:06 +05:30
contrapunctus
cbcb10fdd4
Rename check-preconditions to run-assertions
2021-12-13 11:51:17 +05:30
contrapunctus
a123e59611
Add type checks and assertions for plist group methods
2021-12-13 11:19:05 +05:30
contrapunctus
34ff8f9038
Segregate extended protocol for plist-group backend
2021-12-13 10:21:20 +05:30
contrapunctus
74414c313b
Segregate extended protocol, add check-preconditions
...
Add details to protocol docstrings
2021-12-12 20:01:54 +05:30
contrapunctus
66853efd12
doc: clarify docstring for latest-record
2021-12-06 14:57:37 +05:30
contrapunctus
9d68ac8b53
Merge branch 'dev' into plist-group-handle-split-plists
2021-12-05 22:18:57 +05:30
contrapunctus
975b67af1f
fix: order of records returned by plist-group to-list
2021-12-05 22:16:30 +05:30
contrapunctus
2ac54f418a
Merge branch 'dev' into plist-group-handle-split-plists
2021-12-04 22:45:12 +05:30
contrapunctus
3fd8efea73
Create generic update-properties
2021-12-04 18:41:17 +05:30
contrapunctus
0e8e9f4373
Fix error messages to match Elisp guidelines
2021-12-04 18:39:46 +05:30
contrapunctus
7ddb9c653b
Join line if only deleting a plist
2021-12-04 16:58:45 +05:30
contrapunctus
c70a7791b0
code: use local variables for clarification
2021-12-04 15:15:33 +05:30
contrapunctus
a947cca7c7
Throw error if remove-last is called on backend with no records
2021-12-04 15:13:40 +05:30
contrapunctus
b469defcd4
Throw error if `insert` called with empty plist
2021-12-04 14:25:43 +05:30
contrapunctus
10b592a04b
fix: make replace-last handle split plists
2021-12-04 14:19:31 +05:30
contrapunctus
a669f2b765
fix: prevent leftover empty plist-groups
2021-12-04 12:58:54 +05:30
contrapunctus
07aaa0e78c
fix: make remove-last take split plists into account
...
last-two-split-p - remove redundant conditions (we are checking for a
situation in which the newer-plist-group cannot, by definition, have
>1 plists), change return value.
2021-12-03 22:12:04 +05:30
contrapunctus
9e8c3659d5
Create last-two-split-p
2021-12-03 01:01:27 +05:30
contrapunctus
d108a4fdcb
style: tweak plists-split-p
2021-12-03 00:16:53 +05:30
contrapunctus
17b19d79f5
Create plists-split-p
2021-12-02 17:42:45 +05:30
contrapunctus
5e5697b326
fix: dispatch on correct backend object
...
(This didn't have any incorrect behaviour that I noticed...I wonder why.)
2021-12-01 15:46:29 +05:30
contrapunctus
37bc29d923
fix: pretty printer behaviour for nested list values
2021-11-30 18:10:34 +05:30
contrapunctus
e8eadc7048
fix: message user when discard-active is not applicable
2021-11-29 16:42:42 +05:30
contrapunctus
4eb4f30873
feat: new command chronometrist-discard-active
2021-11-28 17:26:12 +05:30
contrapunctus
14f02ff402
feat: implement backend operation remove-last
2021-11-28 12:36:31 +05:30
contrapunctus
8b82d68822
fix: timer running even when file buffer modified
2021-11-28 00:53:36 +05:30
contrapunctus
55f875ce1f
Change "plist-pp" to "pp"
2021-11-27 18:08:50 +05:30
contrapunctus
87671c5a7f
Merge branch 'doc' into dev
2021-11-22 16:43:59 +05:30
contrapunctus
2d28f896ff
Remove unused local variable
2021-11-22 16:40:27 +05:30
contrapunctus
a2a506f0f3
doc: clarify docstring
2021-11-22 16:39:43 +05:30
contrapunctus
702c1db887
Address byte compiler errors
2021-11-22 01:53:48 +05:30
contrapunctus
7e552e32fd
Enable comment links to ease jumping from compilation errors to LP
2021-11-21 00:45:57 +05:30
contrapunctus
e844e9f4b2
Create command to visit Org literate source
2021-11-19 15:10:17 +05:30
contrapunctus
7a3c5681ce
Write currently-failing plist-pp-to-string test
2021-11-18 02:18:58 +05:30
contrapunctus
866776d028
[plist-pp] handle plist groups
2021-11-08 22:44:01 +05:30
contrapunctus
552c64b967
[plist-pp] use shorter parameter name, add comments, use ?\s
2021-11-01 11:27:41 +05:30
contrapunctus
13c6cd184a
[plist-group] temporary hack - reset data structures on file change
...
I intend to adapt the plist backend's change type detection code so it
can be used for any kind of s-expression file backends.
2021-11-01 11:04:47 +05:30
contrapunctus
38ba060de3
Fix incorrect backend being migrated
2021-11-01 11:03:54 +05:30
contrapunctus
a10e7f6e3a
Fix chronometrist-migrate bugs
2021-11-01 11:03:54 +05:30
contrapunctus
62856f515d
Move fs-watch to backend object slot
2021-11-01 11:03:54 +05:30
contrapunctus
ae8c422d70
Run reset-internal instead of on-change after switching backends
2021-10-31 12:55:11 +05:30
contrapunctus
5892e9737f
Write read-backend-name docstring; move to backend section
2021-10-31 12:53:37 +05:30
contrapunctus
186475d41e
Create switch-backend command and register-backend function
2021-10-31 11:19:09 +05:30
contrapunctus
574ffd996c
Split interval if necessary when clocking out
2021-10-31 09:55:58 +05:30
contrapunctus
7e19560d2a
[plist-group] if required, create new tagged list before record insert
2021-10-30 09:51:21 +05:30
contrapunctus
b70f304eb5
[plist-group] use hash table for task-records-for-date
...
* Move file-backend-mixin and related definitions to "common
definitions for s-expression backends"
* Use loop-sexp-file and reinstate sexp-pre-read-check to reduce
duplication
* Change some generics to dispatch on file-backend-mixin to make them
common to the plist and plist-group backends
2021-10-30 01:17:23 +05:30
contrapunctus
7a17ed14a7
Rename functions; implement to-hash-table for plist-group
...
task-records -> task-records-for-date
active-time-one-day -> active-time-on
New generic - latest-date-records
Removed generic active-time
2021-10-30 00:00:35 +05:30
contrapunctus
06b29e3ce0
Update all references to chronometrist-events (except tests)
2021-10-29 09:54:28 +05:30
contrapunctus
45a2eeec06
Have details frontend use hash-table slot
2021-10-29 01:17:44 +05:30
contrapunctus
436aba7547
Remove list-tasks from backend protocol
2021-10-29 01:06:26 +05:30
contrapunctus
4f0b0c0171
Use to-list + cl-loop instead of cl-loop wrapper macros
2021-10-29 00:40:54 +05:30
contrapunctus
b0482699cd
fix: use unwind-protect to always reset iterator state
2021-10-23 17:06:46 +05:30
contrapunctus
1d300249cc
feat: customizable task list
2021-10-23 16:06:08 +05:30
contrapunctus
d10684f817
Add task-records test; restructure tests
2021-10-21 14:56:04 +05:30
contrapunctus
9eb9a05dd7
Make current-task a regular function
2021-10-21 14:33:50 +05:30
contrapunctus
8fd4d19c82
convert tests to Org LP; move hash table into backend object
...
* create generic functions reset-internal, on-change, backend-empty-p, memory-layer-empty-p
* move most of refresh-file to on-change method
2021-10-20 19:31:11 +05:30
contrapunctus
1aa1a30291
Write tests for loop-records; move generic function
2021-10-15 07:39:59 +05:30
contrapunctus
6424ef662c
Remove docstrings from methods
2021-10-14 09:22:35 +05:30
contrapunctus
052bc23b17
Write backend tests
2021-10-14 09:21:28 +05:30
contrapunctus
d6c980043b
Implement insert method
2021-10-14 08:08:48 +05:30
contrapunctus
1f85435d56
Change slot name and values
2021-10-13 07:05:45 +05:30
contrapunctus
6bdb38f171
Implement replace-last
2021-10-13 06:59:34 +05:30
contrapunctus
786b6937ad
Update task-records for changed loop-records interface
2021-10-13 06:56:45 +05:30
contrapunctus
177eb62d34
Update method for changed loop-records interface
2021-10-12 14:03:08 +05:30
contrapunctus
49d005be82
fix: remove :end from iterator states
2021-10-11 06:05:20 +05:30
contrapunctus
b86825dded
Use keywords for iterator-state; wrap cl-loop in save-excursion
2021-10-11 05:38:58 +05:30
contrapunctus
b76624c8e7
Convert plist-group-backend iterator to method;
...
Initialize iterator-state to t, so point is moved to (point-max) on
the first run of the iterator, too.
Our :after method for initialize-instance only applies to file-related
backends, and is thus changed to only dispatch on file-backend-mixin.
2021-10-10 21:58:27 +05:30
contrapunctus
5402130b27
Make iterator a generic function; store iterator-state as slot
...
Remove file-related details from `loop-records`
2021-10-10 17:52:52 +05:30
contrapunctus
1efc5ec7ac
Move file-related slots into file-backend-mixin
2021-09-19 20:09:35 +05:30
contrapunctus
a8cad8ccac
fix file change detection
2021-09-13 19:34:20 +05:30
contrapunctus
b310aa9298
migrate - fix insertion of file mode prop line
2021-09-12 19:19:41 +05:30
contrapunctus
4637f38408
optimize plist-group-read-record; extend backend documentation
2021-09-12 17:22:08 +05:30
contrapunctus
03b71132dc
loop-records - fix infinite loop; list-tasks - fix test
2021-09-12 17:22:08 +05:30
contrapunctus
e4c33d7097
create backend-generic `cl-loop` interface
2021-09-12 17:22:08 +05:30
contrapunctus
3b9e151bac
migrate - prompt to overwrite if output file exists
2021-09-12 17:21:50 +05:30
contrapunctus
793491eb9b
Remove list-records from protocol (there's already `to-hash-table`)
2021-09-10 19:41:55 +05:30
contrapunctus
69cda68f20
Convert references to chronometrist-file to chronometrist-backend-file
2021-09-09 21:25:40 +05:30
contrapunctus
7d7e801484
Update file watch setup for multiple backends
2021-09-09 18:30:37 +05:30
contrapunctus
34aeec3bb7
Revert changes to date format
...
Refactor spark-durations from spark-row-transformer for ease of
testing
2021-09-09 02:14:04 +05:30
contrapunctus
c14fea723c
(WIP) implement task-records from task-events-in-day
...
Use ISO date instead of TS struct when dates required
2021-09-07 07:21:05 +05:30
contrapunctus
b1192b1fdf
Protocol - move list-records; remove task-time
...
task-time does not need to be polymorphic
2021-09-07 07:20:23 +05:30
contrapunctus
648253172a
Implement task-records
2021-09-07 06:24:13 +05:30
contrapunctus
9e34fb8058
correct to-hash method, class definition
2021-09-06 22:31:27 +05:30
contrapunctus
7f90191a40
rename loop-file; implement list-tasks and current-task methods
2021-09-06 19:32:21 +05:30
contrapunctus
63df54aa2e
chronometrist-migrate - prompt for backends and files
2021-09-06 15:42:02 +05:30
contrapunctus
092f3e8f07
Hard wrap and copy hash table docstring
2021-09-06 01:18:26 +05:30
contrapunctus
8d73749c3f
Associate create-file with both plist and plist-group backends
...
Move definitions common to sexp backends together
2021-09-06 01:18:26 +05:30
contrapunctus
6893299427
Create methods stubs, create basic to-file method and migrate command
2021-09-05 19:10:37 +05:30
contrapunctus
43deef28af
Use backend passed to method rather than active-backend
2021-09-05 17:39:43 +05:30
contrapunctus
3e7c41c9f7
Create on-file-change generic
2021-09-04 20:25:18 +05:30
contrapunctus
083a2f4d8e
Adapt sexp-events-populate to to-hash-table
2021-09-04 20:20:59 +05:30
contrapunctus
78048824e5
Add package prefix to accessors
2021-09-04 19:45:20 +05:30