[Top][All Lists]

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

Re: [Orgmode] Property Drawer question

From: Bastien
Subject: Re: [Orgmode] Property Drawer question
Date: Wed, 15 Aug 2007 00:25:51 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)


Bernt Hansen <address@hidden> 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:


> 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 

(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-entry-put (point) "time" "10m")
    (goto-char pos)))

(ad-activate 'org-insert-heading)

Hope this helps,


reply via email to

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