Khalid Rafi <[email protected]> writes:

> Christian Moe <[email protected]> writes:
>> What kind of habit would you
>> enter? How would you want results to be displayed?
>
> I want to track the number of pages I have read every day. I'll set a
> goal like "Read 20 pages", then record everyday how much I've actually read.

As Bob Newell said elsewhere in the thread, a table is a quick and handy
DIY solution that lets you calculate results and even plot them quite
easily. You could use a capture template for convenience.

If you prefer the Org-habit way of tracking your habits, you could set
it up so you're prompted to record a note upon TODO state changes, and
enter your page numbers as the note, to get a record similar to this:

  * TODO Read 50 pp
    SCHEDULED: <2025-12-30 Tue .+1d>
    :PROPERTIES:
    :STYLE:    habit
    :GOAL:     50
    :LAST_REPEAT: [2025-12-29 Mon 22:02]
    :END:
    - State "DONE"       from "TODO"       [2025-12-29 Mon 22:02] \\
      60
    - State "DONE"       from "TODO"       [2025-12-29 Mon 21:22] \\
      50
    - State "DONE"       from "TODO"       [2025-12-27 Sat 21:22] \\
      35
    - State "DONE"       from "TODO"       [2025-12-26 Fri 21:22] \\
      51

However, AFAIK Org has no existing method for doing anything with the
added data.

If people are interested in doing something like this,
`org-habit-parse-todo' could perhaps be extended to parse state-change
notes for numbers. Then the results could be displayed in some way
beside or instead of the habit graph. We'd need to decide in what format
numerical data can be stored in notes (people might have different ideas
from the simple solution above). We'd also need to decide how they
should be displayed: On the Agenda line beside the habit graph, as the
mean page number read in the last n days (and should missed days count
as 0 towards the mean)? The mean as a percentage of the goal? A
"sparkline" graph replacing the habit graph? A bigger plot that can be
opened in another window? What would you like to see?

Regards,
Christian



Reply via email to