emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] What is the Preferred Method for Logging Creation Date?


From: Ian Barton
Subject: Re: [O] What is the Preferred Method for Logging Creation Date?
Date: Mon, 10 Nov 2014 14:18:17 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 06/11/14 20:20, Dominic Surano wrote:
I'm a huge fan of Org-mode and have been using it daily for a little over a
year. I've been following this list for about 8 months and really benefit
from
the level of technical discussion. I've finally encountered a methodology
problem that I haven't quite been able to wrap my head around and I'm
curious
how other people implement this functionality.

I'm a heavy user of capture templates. One thing I've been struggling with
for a while now is how to appropriately log the creation time of such
templates
in a way that can be useful for agenda views. Knowing WHEN I created a
heading is often just as useful as the content in the heading. The end goal
is to
be able to quickly pull up an agenda view that shows each entry on the day /
time it was created.

For all the examples below, I've just included the FINAL output from org-
capture rather than the templates themselves. I feel I have a pretty good
understanding of capture templates, but can provide them if you think
they'll help in formulating a solution.

Org-mode currently has built in support for DEADLINE, SCHEDULED, and CLOSED
times. Ideally, for my use cases, CREATED would also be built in such that
headings would look like:

* DONE Task
   CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu> CREATED: [2014-
11-06 Thu 10:50]
   :LOGBOOK:
   - State "DONE"       from "TODO"       [2014-11-06 Thu 10:59]
   :END:
   :PROPERTIES:
   :Via:      Origin of this task
   :Note:     Note describing task
   :ID:       64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
   :END:

And I would be able to pull up an agenda view using a similarly named
special property (http://orgmode.org/manual/Special-properties.html#Special-
properties). Unfortunately, since CREATED is not a special property, I end
up with:

* DONE Task
   CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu>
   :LOGBOOK:
   - State "DONE"       from "TODO"       [2014-11-06 Thu 10:59]
   :END:
   CREATED: [2014-11-06 Thu 10:50]
   :PROPERTIES:
   :Via:      Origin of this task
   :Note:     Note describing task
   :ID:       64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
   :END:

I consider this similar to Bernt Hansen's approach
(http://doc.norang.ca/org-mode.html#InsertInactiveTimestamps). Turning on
inactive timestamps, using v
[ in the agenda view, doesn't just pull up the CREATED time, but also the
state change time in LOGBOOK in addition to any other inactive timestamps
(either in the entry, notes in LOGBOOK, etc.). I've considered using the
special property TIMESTAMP_IA, but unfortunately, as shown above "CREATED:
..."
always ends up getting bumped down when a state change is made or note is
taken, and the :LOGBOOK: drawer is created.

I have no doubt that implementing CREATED as a special time would be non-
trivial.

Here are some solutions I've contemplated implementing:

1) Including the creation date in the logbook using a format consistent with
org-todo state changes:

* DONE Task
   CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu>
   :LOGBOOK:
   - State "DONE"       from "TODO"       [2014-11-06 Thu 10:59]
   - State "TODO"       from ""           [2014-11-06 Thu 10:50]
   :END:
   :PROPERTIES:
   :Via:      Origin of this task
   :Note:     Note describing task
   :ID:       64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
   :END:

This seems to make a lot of sense (although I'm still unclear about how to
generate the aforementioned agenda view), but it breaks down for capture
templates that don't use org-todo-keywords (i.e. are ALWAYS stateless).

2) Including the creation date in the logbook using something similar to
note (C-c z):

* DONE Task
   CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu>
   :LOGBOOK:
   - State "DONE"       from "TODO"       [2014-11-06 Thu 10:59]
   - Created from capture template on [2014-11-06 Thu 10:50]
   :END:
   :PROPERTIES:
   :Via:      Origin of this task
   :Note:     Note describing task
   :ID:       64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
   :END:

This makes sense, but breaks consistency with org-todo state changes and has
the same agenda problem described in (1).

3) Including the creation date in a the property drawer:

* DONE Task
   CLOSED: [2014-11-06 Thu 10:59] DEADLINE: <2014-11-06 Thu>
   :LOGBOOK:
   - State "DONE"       from "TODO"       [2014-11-06 Thu 10:59]
   - State "TODO"       from ""           [2014-11-06 Thu 10:50]
   :END:
   :PROPERTIES:
   :Via:      Origin of this task
   :Note:     Note describing task
   :Created:  [2014-11-06 Thu 10:50]
   :ID:       64f7fa18-0936-46cb-a2c8-21a0fbc9bae3
   :END:

This would maintain consistency with org-todo, but I'm not sure how I would
generate the agenda view. It seems to be the preferred method for users of
org-expiry.el.


Not quite what you wanted, but I use CREATED in the PROPERTY draw:

("t" "Todo" entry (file+headline
"~/Documents/emacs/org/org_files/tasks/todo.org" "Tasks") "* TODO %?\nSCHEDULED: %^t\n
:PROPERTIES:\n:CREATED: %U\n:LOGGING: DONE(@)\n:END:\n%a\n" :prepend t)

I haven't needed to filter the Agenda by a PROPERTY, but according to http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html it is possible. However, a quick Google doesn't turn up any examples.

Ian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]