Merge branch 'doc' into dev

This commit is contained in:
contrapunctus 2021-06-22 11:50:48 +05:30
commit e7561cf0bb
2 changed files with 61 additions and 32 deletions

View File

@ -14,21 +14,23 @@
("cr" . "chronometrist-report")
("cs" . "chronometrist-statistics")
("cx" . "chronometrist-sexp")))))
(org-mode . ((org-tags-column . -60)
(org-html-self-link-headlines . t)
(eval . (org-indent-mode))
(org-html-head
. (concat "<link rel=\"stylesheet\" "
"type=\"text/css\" "
"href=\"../org-doom-molokai.css\" />"))
(eval . (progn
(make-local-variable 'after-save-hook)
(add-hook 'after-save-hook
(lambda nil
(interactive)
(compile
(mapconcat #'shell-quote-argument
`("emacs" "-q" "-Q" "--batch" "--eval=(require 'ob-tangle)"
,(format "--eval=(org-babel-tangle-file \"%s\")" (buffer-file-name)))
" ")))
nil t))))))
(org-mode
. ((org-html-self-link-headlines . t)
(eval . (org-indent-mode))
(org-html-head
. (concat "<link rel=\"stylesheet\" "
"type=\"text/css\" "
"href=\"../org-doom-molokai.css\" />"))
(eval
. (add-hook
'after-save-hook
(lambda ()
(let ((fn (buffer-file-name)))
(when (y-or-n-p (format "Tangle file %s?" fn))
(compile
(mapconcat #'shell-quote-argument
`("emacs" "-q" "-Q" "--batch" "--eval=(require 'ob-tangle)"
,(format "--eval=(org-babel-tangle-file \"%s\")" fn))
" ")))))
nil t))
(eval . (add-hook 'before-save-hook (lambda nil (org-align-all-tags)) nil t)))))

View File

@ -25,20 +25,26 @@
* timer will only refresh when clocked in...
7. [X] regression - no value history
8. [ ] Possible to add the same key-value twice
* Clock in - clock out - add key-value and accept - delete =:stop= time and save - clock out again - accept the already-inserted key-value - duplicate!
** Features [25%]
1. [ ] Create chronometrist-unused-projects-list + chronometrist-projects-list.
2. [ ] New commands
* Steps
1. Ensure that =chronometrist-kv-add= is present in =chronometrist-before-out-functions=
2. Clock in
3. Clock out
4. Add key-value and accept
5. Delete =:stop= time and save
6. Clock out again
7. Accept the already-inserted key-value. Duplicate!
** Features [33%]
1. [ ] New commands
1. [ ] *Kill/discard* (bind to 'k') - which will delete the interval currently being recorded.
- Most conservative option - it will only operate on the project at point, and will only kill for a clocked-in project.
- Somewhat less conservative option - it will operate on the currently clocked-in project, no matter where point is.
- It _should_ ask for confirmation.
- Alternatively, or as a complement - an *undo command*, which will undo your last action (clock in or clock out).
- Undo and redo seem like the best bets.
3. [ ] Hook enhancement - can we supply the whole plist (including tags and key-values) to the task-start hooks, so users can have even smarter hook functions?
2. [ ] Hook enhancement - can we supply the whole plist (including tags and key-values) to the task-start hooks, so users can have even smarter hook functions?
* That would mean ensuring that -kv-read runs before other hooks.
* Actually, it should be trivial to access the last expression in the file, so maybe this is unnecessary.
4. [X] Revisit 'no reason' commands - maybe we should ask for tags and key-values with the regular commands, and skip them with the 'no reason' variants?
3. [X] Revisit 'no reason' commands - maybe we should ask for tags and key-values with the regular commands, and skip them with the 'no reason' variants?
*** Key-values [66%]
1. [X] bug - value-history appears in chronological rather than reverse chronological order
2. [X] generate history hash table from chronometrist-file.
@ -172,6 +178,7 @@ Some options and ideas -
* Or even the first expression of the current date. That way, we just re-read the intervals for today. Because chronometrist-events uses dates as keys, it's easy to work on the basis of dates.
6. [ ] Don't generate tag/keyword/value history from the entire log, just from the last N days (where N is user-customizable).
7. [ ] Just why are we reading the whole file? ~chronometrist~ should not read more than a day; ~chronometrist-report~ should not read more than a week at a time, and so on. Make a branch which works on this logic, see if it is faster.
** Clocking in/out might be too slow for my liking
* Certain
1. [ ] statistics UI for arbitrary queries
@ -328,8 +335,6 @@ Some options and ideas -
10. [ ] =chronometrist-timer= - if =chronometrist-file= is being edited (buffer exists and modified), don't refresh - this will (hopefully) prevent Emacs from going crazy with errors in trying to parse malformed data.
* Maybe
** Code
1. There is some duplication among extensions - =*-setup= and =*-teardown= functions in =goal= and =sparkline= could be refactored into a common helper for all extensions.
** New features [14%]
1. [ ] Interact with Chronometrist from phone, tablet, or smart watches. (Help needed, I'm a total strange to mobile development and don't own any wearables.)
2. [ ] Some way to use markup (Markdown, Org, etc) for certain plist values.
@ -408,7 +413,7 @@ Some options and ideas -
- untouched project with target defined - red
- target ±5 minutes - green
- target*2 and above - red
* documentation discoverability :doc:
* documentation discoverability :doc:
Ensure that the user manual is easily discoverable.
#+BEGIN_QUOTE
@ -422,7 +427,7 @@ Ensure that the user manual is easily discoverable.
[2021-06-02 13:53:37] rnkn: although you will probably need a function link instead to find the org file \\
[2021-06-02 13:54:30] contrapunctus: Although I guess the manual.org does not really need those fancy features...info export could work for it. \\
#+END_QUOTE
* macro for extensions :code:extension:
* macro for extensions :code:extension:
<2021-06-07T16:33:54+0530>
A macro to create new columns for Chronometrist.
@ -447,7 +452,7 @@ Benefits -
+ easier creation of such extensions
+ users can easily replace the function used to generate the cells, without having to deal with how the string is inserted into the row specifier.
* unified format-duration function
* unified format-duration function :code:customization:
<2021-06-08T11:17:54+0530>
Currently we have at least three ways of displaying durations - ="HH:MM:SS"= , ="XhYm"= , and =X hour(s), Y minutes(s)"= . Make a single function similar to =format-time-string=, but for durations. =ts-human-format-duration= from =ts.el= is not nearly as flexible as I'd like. When completed, we can have a single custom variable accepting a format string, which can be used to customize display of durations for the entire application at once.
@ -485,7 +490,7 @@ Alternative syntax
+ to display only values, use ="%<code>"=
+ to display long units, use ="~[<separator>]<code>"=
* error - =min= called with nil :spark:bug:
* DONE error - =min= called with nil :spark:bug:
<2021-06-11T03:44:17+0530>
1. clock in
2. change =:start= of active interval to another time on the same date
@ -539,7 +544,7 @@ Debugger entered--Lisp error: (wrong-number-of-arguments #<subr min> 0)
command-execute(file-notify-handle-event nil [(file-notify ((1 . 1) (modify) "chronometrist.sexp" 0) file-notify--callback-inotify)] t)
#+END_SRC
* discoverability and mouse-accessibility of commands
* STARTED discoverability and mouse-accessibility of commands [33%] :ux:
<2021-06-15T16:18:49+0530>
Goals
1. discoverability of commands
@ -555,7 +560,7 @@ Strategies
* Perhaps I needn't worry too much. =menu-bar-mode= is enabled by default, and it makes #1 and #2 easy. I think a significant amount of the userbase disables =menu-bar-mode=, but they also have things like =counsel-M-x=, =describe-=.
+ The menu does not make the behavior of the numeric argument discoverable. Doesn't make sense to put it there, either.
* querying and narrowing the chronometrist-file buffer :feature:
* query-editing the file buffer :feature:
<2021-06-16T07:50:21+0530>
=chronometrist-loop-file= can be used to run queries against user data. It would be cool to be able to edit the file directly from the query results.
@ -563,3 +568,25 @@ Strategies
[[info:elisp#Narrowing][narrowing]]?)
2. The result data may be something which corresponds to the input data, in which case we could jump to the corresponding plist.
3. The result data may be impossible to trace back to the input data (e.g. a sum of intervals from many plists), in which case we cannot provide direct editing.
* error in change type detection :core:bug:
<2021-06-16T18:40:18+0530>
Steps
1. Clock in
2. Delete active task plist, but don't save
3. Clock in to different task. Error.
Might have to do with there being 2 empty lines between the last-but-one plist and the new last plist.
* spark monthly view :spark:feature:
:PROPERTIES:
:feature: frontend
:END:
<2021-06-17T00:08:08+0530>
Frontend to show one or more months for a specific task, calendar-style, with each day being a single sparkline block.
* Task-specific detailed view :feature:
:PROPERTIES:
:feature: frontend
:END:
<2021-06-22T04:57:06+0530>
Frontend similar to =chronometrist=, but specific to one task - displays its unique tag/key-value combinations and their sparklines. Time period (day, week, etc) could be customizable.