To record a timestamp and a note when changing a TODO state, call the
org-todo with a prefix argument.
Prompt for a note and record a the time of the TODO state change.
Org mode can also automatically record a timestamp and optionally a note when you mark a TODO item as DONE, or even each time you change the state of a TODO item. This system is highly configurable, settings can be on a per-keyword basis and can be localized to a file or even a subtree. For information on how to clock working time for a task, see Clocking Work Time.
The most basic logging is to keep track of when a certain TODO item was marked as done. This can be achieved with4
(setq org-log-done 'time)
Then each time you turn an entry from a TODO (not-done) state into any of the DONE states, a line ‘CLOSED: [timestamp]’ is inserted just after the headline.
If you want to record a note along with the timestamp, use5
(setq org-log-done 'note)
You are then be prompted for a note, and that note is stored below the entry with a ‘Closing Note’ heading.
You might want to keep track of TODO state changes. You can either
record just a timestamp, or a time-stamped note for a change. These
records are inserted after the headline as an itemized list. When
taking a lot of notes, you might want to get the notes out of the way
into a drawer. Customize the variable
org-log-into-drawer to get
For state logging, Org mode expects configuration on a per-keyword basis. This is achieved by adding special markers ‘!’ (for a timestamp) and ‘@’ (for a note) in parentheses after each keyword. For example:
#+TODO: TODO(t) WAIT(w@/!) | DONE(d!) CANCELED(c@)
defines TODO keywords and fast access keys, and also request that
a time is recorded when the entry is set to ‘DONE’, and that a note is
recorded when switching to ‘WAIT’ or ‘CANCELED’. The same syntax
works also when setting
The corresponding in-buffer setting is ‘#+STARTUP: logdone’.
The corresponding in-buffer setting is ‘#+STARTUP: logenotedone’.