emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Bernt Hansen <bernt@norang.ca>
Cc: emacs-orgmode@gnu.org, Tommy Kelly <tommy.kelly@verilab.com>
Subject: Re: Understanding habits - org-log-done
Date: Tue, 04 Jan 2011 21:50:05 -0500	[thread overview]
Message-ID: <87ipy483oi.fsf@fastmail.fm> (raw)
In-Reply-To: <877helr2t5.fsf@norang.ca> (Bernt Hansen's message of "Mon, 03 Jan 2011 18:21:42 -0500")

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

      reply	other threads:[~2011-01-05  2:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ipy483oi.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=bernt@norang.ca \
    --cc=emacs-orgmode@gnu.org \
    --cc=tommy.kelly@verilab.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).