Bernt Hansen <be...@norang.ca> writes: > Tommy Kelly <tommy.ke...@verilab.com> writes: > >> For habits to work, he manual says that "You must also have state >> logging for the DONE state enabled". My experimentation leads me to >> believe that the state logging must not only be enabled but it must be >> such that org-log-done is set to 'time and *not* to 'note. I tried the >> latter and it doesn't seem to be interpreted as a state change. >> >> Is that as it should be? >> >> Suppose I want to keep a note. Maybe it's "Go for run" and I want to log >> time or distance. Is that possible? > > I can confirm this. I personally only log state changes to DONE but > setting a LOGGING property value of lognotedone prompts for a note and > fails to show the history for the habit in the graph. > > This is probably a bug.
Yes. The regexp that searches for completed tasks in org-habit is hard-coded to look for a 'State "DONE"' string. When org-log-done is set to note, however, the log entries begin with 'CLOSING NOTE'. (A related problem here is that it assumes DONE is the only relevant todo keyword.) One workaround is to add the property LOGGING and set its value to lognoterepeat. This produces notes with timestamps in the following format (compatible with org-habit): - State "DONE" from "TODO" [2011-01-01 Sat 21:11] \\ 5 miles. Another workaround is to make the setting associated with 'done in org-log-note-headings to the same as 'state. One quick way to do that is by evaluating the following expression: (setcdr (assoc 'done org-log-note-headings) (assoc 'state org-log-note-headings)) As an aside, it seems to me that the "CLOSING NOTE" format that results when org-log-done is set to 'note is inconsistent with other logging behavior. For instance, when a "@" is added in org-todo-keywords, the note is entered with the state change string. Best, Matt _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode