From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Property Drawer question Date: Wed, 15 Aug 2007 00:25:51 +0200 Message-ID: <87k5rxiwi8.fsf@bzg.ath.cx> References: <873aymktck.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IL4pw-0007ut-7A for emacs-orgmode@gnu.org; Tue, 14 Aug 2007 18:26:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IL4pt-0007uM-L7 for emacs-orgmode@gnu.org; Tue, 14 Aug 2007 18:26:02 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IL4pt-0007uH-Fz for emacs-orgmode@gnu.org; Tue, 14 Aug 2007 18:26:01 -0400 Received: from hu-out-0506.google.com ([72.14.214.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IL4pt-0005Qf-5C for emacs-orgmode@gnu.org; Tue, 14 Aug 2007 18:26:01 -0400 Received: by hu-out-0506.google.com with SMTP id 23so1672318huc for ; Tue, 14 Aug 2007 15:26:00 -0700 (PDT) In-Reply-To: <873aymktck.fsf@gollum.intra.norang.ca> (Bernt Hansen's message of "Tue\, 14 Aug 2007 11\:51\:07 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org Hello, Bernt Hansen writes: > I'm starting to play with property drawers and I am thinking this > would be a good place to store estimated durations for tasks with > something like Actually the property-related functions in Org have been set for this purpose -- see the historical (!) thread here: http://article.gmane.org/gmane.emacs.orgmode/2020 > I'd like to globally set up > > :time_ALL: 10m 30m 1h 2h 4h 6h 12h 18h 24h 30h I don't know about any "global" solution for setting properties (except for #+COLUMNS). But since you unleashed the word "template", i think we could think about something like this: #+PROPERTIES: :ITEM: A default heading #+PROPERTIES: :time_ALL: 10m 30m 1h 2h 4h 6h 12h 18h 24h 30h #+PROPERTIES: :time: 10m :TAGS: @HOME @WORK (I think grouping is not important here, since it always a succession of pairs like :keyword: value(s).) > Also I'd like org-insert-property-drawer to always have this :time: > 10m default entry when new property drawers are created. Is there a > way to specify the drawer template somehow? Maybe you could advise `org-insert-property-drawer' like this: (defadvice org-insert-property-drawer (after add-time-property) "Add a :Time: property after inserting a property drawer." (let ((pos (point))) (org-entry-put (point) "Time" "10m") (goto-char pos))) (ad-activate 'org-insert-property-drawer) Or even advise `org-insert-heading' [M-RET]: (defadvice org-insert-heading (after add-custom-time-property) "Add a custom :Time: property after heading insertion." (let ((pos (point))) (org-insert-property-drawer) (org-entry-put (point) "time" "10m") (goto-char pos))) (ad-activate 'org-insert-heading) Hope this helps, -- Bastien