emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* What is the Preferred Method for Logging Creation Date?
@ 2014-11-06 20:20 Dominic Surano
  2014-11-10 14:18 ` Ian Barton
  2014-11-10 18:00 ` Karl Voit
  0 siblings, 2 replies; 4+ messages in thread
From: Dominic Surano @ 2014-11-06 20:20 UTC (permalink / raw)
  To: emacs-orgmode

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. 

What do other people do? What makes the most sense?

Here are some previous threads I found and read that either directly or 
tangentially address this topic:

http://comments.gmane.org/gmane.emacs.orgmode/89968/
http://comments.gmane.org/gmane.emacs.orgmode/68252
http://comments.gmane.org/gmane.emacs.orgmode/56406/
http://comments.gmane.org/gmane.emacs.orgmode/47219/
http://comments.gmane.org/gmane.emacs.orgmode/26474/
http://comments.gmane.org/gmane.emacs.orgmode/12430/
http://comments.gmane.org/gmane.emacs.orgmode/18937/
http://comments.gmane.org/gmane.emacs.orgmode/6306/
http://comments.gmane.org/gmane.emacs.orgmode/3783/

Thanks for reading!

Dominic

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-10 18:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 20:20 What is the Preferred Method for Logging Creation Date? Dominic Surano
2014-11-10 14:18 ` Ian Barton
2014-11-10 14:21   ` Ian Barton
2014-11-10 18:00 ` Karl Voit

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).