emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ian Barton <lists@wilkesley.net>
To: emacs-orgmode@gnu.org
Subject: Re: What is the Preferred Method for Logging Creation Date?
Date: Mon, 10 Nov 2014 14:18:17 +0000	[thread overview]
Message-ID: <5460C929.7040208@wilkesley.net> (raw)
In-Reply-To: <loom.20141106T191532-177@post.gmane.org>

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	other threads:[~2014-11-10 14:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-06 20:20 What is the Preferred Method for Logging Creation Date? Dominic Surano
2014-11-10 14:18 ` Ian Barton [this message]
2014-11-10 14:21   ` Ian Barton
2014-11-10 18:00 ` Karl Voit

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=5460C929.7040208@wilkesley.net \
    --to=lists@wilkesley.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=ian@manor-farm.org \
    /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).