* Understanding habits - org-log-done
@ 2011-01-03 20:10 Tommy Kelly
2011-01-03 23:21 ` Bernt Hansen
0 siblings, 1 reply; 3+ messages in thread
From: Tommy Kelly @ 2011-01-03 20:10 UTC (permalink / raw)
To: emacs-orgmode
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?
thanks,
Tommy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understanding habits - org-log-done
2011-01-03 20:10 Understanding habits - org-log-done Tommy Kelly
@ 2011-01-03 23:21 ` Bernt Hansen
2011-01-05 2:50 ` Matt Lundin
0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2011-01-03 23:21 UTC (permalink / raw)
To: Tommy Kelly; +Cc: emacs-orgmode
Tommy Kelly <tommy.kelly@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.
Regards,
Bernt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Understanding habits - org-log-done
2011-01-03 23:21 ` Bernt Hansen
@ 2011-01-05 2:50 ` Matt Lundin
0 siblings, 0 replies; 3+ messages in thread
From: Matt Lundin @ 2011-01-05 2:50 UTC (permalink / raw)
To: Bernt Hansen; +Cc: emacs-orgmode, Tommy Kelly
Bernt Hansen <bernt@norang.ca> writes:
> Tommy Kelly <tommy.kelly@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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-05 2:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 20:10 Understanding habits - org-log-done Tommy Kelly
2011-01-03 23:21 ` Bernt Hansen
2011-01-05 2:50 ` Matt Lundin
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).