To-do Lists with Org

Among Emacs enthusiasts I think I have been a latecomer to org-mode. Truth is I have dabbled with it on and off for years, but time and again found myself returning to pen and paper or my own never-fully-developed structured text format for my note-taking needs. This summer I came back to org to try one more time to grok it and make it my one true text format, and I think this time it's for keeps.

Learning to use the agenda and global to-do views were the first two things that improved my org experience. Those are rather obvious though, so I didn't intend to blog about them. Customizing the way to-do items work was the latest, and getting that just right involved a bit of research, not only reading the docs, but also the source code, and getting some help from those who have gone this way before.

The way I think about a to-do item is like this. I want to keep a full log of my progress with any given item. That means I want to notate not only when I completed the item (which org does by default) but I also want a record of when I created the item, and also records of each point of progress. Here is what I came up with:

(setq org-todo-keywords
      '((sequence "TODO(t!)" "|" "DONE(d!)" "CANCELLED(c!)")))

(setq org-treat-insert-todo-heading-as-state-change t
      org-log-states-order-reversed nil
      org-log-into-drawer t
      org-log-done nil)

(eval-after-load 'org
  '(setcdr (assq 'state org-log-note-headings)
           "State -> %s  %t"))

Let's just run down these variables one by one.

So there you have it, my org to-do config. It allows me to keep a detailed record of my progress with to-do items. There are further tweaks that could be made to org-todo-keywords to improve it more, specifically, using the @ flag and the / special syntax, but what I have already may be good enough. I will conclude this entry with an example, showing what a completed to-do entry looks like in this configuration.

* DONE blog about org to-do config
  - State -> "TODO"  [2011-09-28 Wed]
  - State -> "DONE"  [2011-09-28 Wed]

It works!