From cdcc059b26e4c922d94bb67521c6c87e84fa5642 Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Sun, 13 Feb 2022 17:07:18 +0530 Subject: [PATCH 1/5] Add notes on multiple intervals/time deduction --- TODO.org | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TODO.org b/TODO.org index d2cb667..6121749 100644 --- a/TODO.org +++ b/TODO.org @@ -855,6 +855,9 @@ With different checks, for different levels of speed/thoroughness - #+END_SRC It doesn't do anything not already possible in the current formats. At best, it removes some duplication when the same task is "paused" and "resumed". ++ Sometimes you pause and resume a task and don't want to split your key-values between >1 intervals (to avoid messing up completion suggestions for the future). An alternative means to the same end could be to add a key like =:deduct ""= or =:deduct ("" . "")=. + - This will also make it easier to support formats like [[https://klog.jotaen.net/][klog]], which support this feature. + - It will probably complicate all data consuming code, though...think of =chronometrist-details= 🤔 ** "event records" - records with only a timestamp :feature: :PROPERTIES: From fe9ed8c7f01d80abcd1846aa82a0f9df680298d3 Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Mon, 14 Feb 2022 09:00:31 +0530 Subject: [PATCH 2/5] Add customizable alerts idea --- TODO.org | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/TODO.org b/TODO.org index 6121749..79281d4 100644 --- a/TODO.org +++ b/TODO.org @@ -737,7 +737,9 @@ for )" #+END_SRC * STARTED customizable duration output :feature: -See branch =format-seconds=. +:PROPERTIES: +:branch: format-seconds +:END: 1. [X] define =chronometrist-duration-formats= to hold duration formats for different use cases in Chronometrist. 2. [ ] define customization type for =chronometrist-duration-formats= to create user-friendly Custom interface 3. [ ] make non-tabular parts of Chronometrist buffers adapt to column widths, to accomodate changes in duration formats @@ -933,6 +935,11 @@ Additional rules: + /Avoid taking other unearned breaks/ if possible — so try to do personal tasks during normal or big breaks, or before/after your work day. #+END_QUOTE +Example flow +1. work for 30m +2. clock out - add 10m to =break-time= +3. clock in after a 5m break - subtract 5m from =break-time= + 1. [X] =chronometrist-third-fraction= 2. [X] =chronometrist-third-break-time= 3. [X] on clock out, increment =break-time= and start timed notification @@ -950,8 +957,23 @@ Extras 3. handle user edits to the database * last record modified - ? * remove last record - ? + * example - interval extended + 1. work 10 minutes and clock out - +3m break time + 2. edit stop time to add +20 minutes of work (30m total) + * compare with old data in hash table - decrement break time added by old plist, increment break time added by new plist -Example flow -1. work for 30m -2. clock out - add 10m to =break-time= -3. clock in after a 5m break - subtract 5m from =break-time= +* Customizable alerts +:PROPERTIES: +:CREATED: 2022-02-14T08:22:36+0530 +:END: +=chronometrist-third= and =chronometrist-goal= have nearly identical alert code; additionally, users cannot customize the alert style per-alert without basically rewriting the alert functions. + +Convert =chronometrist-third-alert-functions= and =chronometrist-goal-alert-functions= to customizable alists whose entries take the form =(SYMBOL FUNCTION ALERT-FN &rest ALERT-ARGS)=, where ++ =SYMBOL= uniquely identifies the alert, ++ =FUNCTION= is a function calling =chronometrist-*-run-at-time= and =ALERT-FN=, and ++ =ALERT-ARGS= are passed to =ALERT-FN=. + +=ALERT-FN= will usually be =alert=, and =ALERT-ARGS= will usually be keyword arguments passed to =alert=. +Similar to how they behave now, these packages will start/stop functions for all entries provided in these alists. (So the user can still control which alerts are run.) + +Also define =chronometrist--timer-alist=, which associates =symbol= with a timer object. From e7fd4df27e56611084e9f778aa6e8c3d8fef1948 Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Mon, 14 Feb 2022 09:00:54 +0530 Subject: [PATCH 3/5] Split Third Time section into headings --- TODO.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TODO.org b/TODO.org index 79281d4..dd5a4dc 100644 --- a/TODO.org +++ b/TODO.org @@ -935,11 +935,12 @@ Additional rules: + /Avoid taking other unearned breaks/ if possible — so try to do personal tasks during normal or big breaks, or before/after your work day. #+END_QUOTE -Example flow +** Example flow 1. work for 30m 2. clock out - add 10m to =break-time= 3. clock in after a 5m break - subtract 5m from =break-time= +** Tasks 1. [X] =chronometrist-third-fraction= 2. [X] =chronometrist-third-break-time= 3. [X] on clock out, increment =break-time= and start timed notification @@ -951,7 +952,7 @@ Example flow * [ ] Hook function which prompts for work hours whenever you first clock in on a date. If work hours are defined in the custom variable, ask whether to use them - on negative answer, prompt for today's work hours. If work hours are not defined, prompt for today's work hours. 7. [ ] Displaying/recording breaks. Probably done implicitly - when work hours are defined, any time not spent working can be interpreted as break time. -Extras +** Extras 1. persist =break-time= between Emacs sessions 2. audible alerts 3. handle user edits to the database From a5c709253f785babe924fb6b7528464bcee2d86f Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Mon, 14 Feb 2022 13:05:02 +0530 Subject: [PATCH 4/5] Add CUSTOM_ID, macro idea --- TODO.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TODO.org b/TODO.org index dd5a4dc..81a5db5 100644 --- a/TODO.org +++ b/TODO.org @@ -966,10 +966,11 @@ Additional rules: * Customizable alerts :PROPERTIES: :CREATED: 2022-02-14T08:22:36+0530 +:CUSTOM_ID: customizable-alerts :END: =chronometrist-third= and =chronometrist-goal= have nearly identical alert code; additionally, users cannot customize the alert style per-alert without basically rewriting the alert functions. -Convert =chronometrist-third-alert-functions= and =chronometrist-goal-alert-functions= to customizable alists whose entries take the form =(SYMBOL FUNCTION ALERT-FN &rest ALERT-ARGS)=, where +Convert =chronometrist-third-alert-functions= and =chronometrist-goal-alert-functions= to customizable alists[fn:4] whose entries take the form =(SYMBOL FUNCTION ALERT-FN &rest ALERT-ARGS)=, where + =SYMBOL= uniquely identifies the alert, + =FUNCTION= is a function calling =chronometrist-*-run-at-time= and =ALERT-FN=, and + =ALERT-ARGS= are passed to =ALERT-FN=. @@ -978,3 +979,5 @@ Convert =chronometrist-third-alert-functions= and =chronometrist-goal-alert-func Similar to how they behave now, these packages will start/stop functions for all entries provided in these alists. (So the user can still control which alerts are run.) Also define =chronometrist--timer-alist=, which associates =symbol= with a timer object. + +[fn:4] Actually, make a macro to define such alists, since the docstrings are likely to be near-identical. From 2eed71ad8565169a3639b79bebdad951ffc7c7ff Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Mon, 14 Feb 2022 20:47:12 +0530 Subject: [PATCH 5/5] Add 'canned key-values' idea --- TODO.org | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO.org b/TODO.org index 81a5db5..b767c5d 100644 --- a/TODO.org +++ b/TODO.org @@ -860,6 +860,7 @@ It doesn't do anything not already possible in the current formats. At best, it + Sometimes you pause and resume a task and don't want to split your key-values between >1 intervals (to avoid messing up completion suggestions for the future). An alternative means to the same end could be to add a key like =:deduct ""= or =:deduct ("" . "")=. - This will also make it easier to support formats like [[https://klog.jotaen.net/][klog]], which support this feature. - It will probably complicate all data consuming code, though...think of =chronometrist-details= 🤔 + - An alternative idea could be to define a custom variable to hold the user's key values. If this variable is defined, it would be used instead of generating suggestions from past key-values. That way, such situations will not affect key-value suggestions. ** "event records" - records with only a timestamp :feature: :PROPERTIES: