From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: What is the Preferred Method for Logging Creation Date? Date: Mon, 10 Nov 2014 14:21:27 +0000 Message-ID: <5460C9E7.5080004@wilkesley.net> References: <5460C929.7040208@wilkesley.net> Reply-To: ian@manor-farm.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnpqc-0001st-31 for emacs-orgmode@gnu.org; Mon, 10 Nov 2014 09:21:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnpqW-0004kg-Gq for emacs-orgmode@gnu.org; Mon, 10 Nov 2014 09:21:38 -0500 Received: from mail2.wilkesley.net ([109.74.196.44]:52873 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnpqW-0004io-2N for emacs-orgmode@gnu.org; Mon, 10 Nov 2014 09:21:32 -0500 Received: from scamper2.bantercat.co.uk (unknown [46.33.134.31]) (Authenticated sender: lists@wilkesley.net) by li40-130.members.linode.com (Postfix) with ESMTPSA id 3400310DDDC for ; Mon, 10 Nov 2014 14:21:29 +0000 (UTC) In-Reply-To: <5460C929.7040208@wilkesley.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On 10/11/14 14:18, Ian Barton wrote: > 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. > > I didn't look hard enough. Here: https://stackoverflow.com/questions/10033797/matching-property-in-agenda-view is an example of filtering the Agenda using a PROPERTY. Ian.