Org-mode Hidden Gems - 04 TODO Items

Use TODO keywords as types

Turns out there are 2 interpretations of TODO keywords: sequence and type. The more commonly used one, sequence, cycles through keywords one by one with org-todo (C-c C-t) (except when fast access is assigned in the form of TODO(t)). The type interpretation, as the name suggests, regards each keyword as independent type. When org-todo, keyword will jump directly to DONE state. That’s the only difference.

Not much of interest at first sight, but at second thought it is very useful for tracking progress in a small team setting. Say I work with colleagues in the same project and we’re in charge of different parts. I can use type sequence to indicate division of labor and setup expected deadlines/schedules as usual, without needing to know their progress details. It’s a task assignment system, only in a much more lightweight fashion. (Yes I’m looking up to you Jira Kanban.)

Hierarchical todo statistics

org-hierarchical-todo-statistics controls whether TODO statistics should cover only direct children. This can be set on a per-subtree basis.

Change log note templates

If any of org-log-(done/refile/repeat/reschedule/redeadline) is set to note, then a status change would trigger insertion of a note in the :LOGBOOK: drawer. It’s possible to define template for notes via org-log-note-headings. Here’s my setting, which adds new timestamp (%s) to reschedule and redeadline:

(setq org-log-note-headings '((done        . "CLOSING NOTE %t")
                              (state       . "State %-12s from %-12S %t")
                              (note        . "Note taken on %t")
                              (reschedule  . "Schedule changed on %t: %S -> %s")
                              (delschedule . "Not scheduled, was %S on %t")
                              (redeadline  . "Deadline changed on %t: %S -> %s")
                              (deldeadline . "Removed deadline, was %S on %t")
                              (refile      . "Refiled on %t")
                              (clock-out   . "")))

These days I set many of org-log-* to note to keep verbose log of task progress. Whenever a task is delayed/rescheduled/redeadlined, the reasons are kept as notes in logbook drawer. In this way, a full history is retained while not intervening normal edits. Verbose timestamps also helps in keeping a daily working journal, and when using Org Sparse Trees (especially with the c option).

Org habit

Org-habit tracks consistency of TODO item finish states. It produces a nice graph in Org-agenda that I can at one glance know whether I’m on track.

! means today and * means a task has been done on that day. The color interpretation is intuitive: Green means on track, yellow warning sign of overdue, red overdue, and blue “still early, don’t feel bad taking a break”.

It’s a feature I’ve been using for a while now and has benefited me most. Setup is straight-forward (set property STYLE to habit and specify repeat frequency), see Org habit manual for details.

The reality of things consists in their persistent forcing themselves upon our recognition. If a thing has no such persistence, it is a mere dream. Reality, then, is persistence, is regularity.

– C. S. Peirce

That concludes TODO items. On a side note, if you’re interested in my Org or general settings, it’s now published at yiufung/dot-emacs.

Org-mode Hidden Gems series:

comments powered by Disqus