emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Property Drawer question
@ 2007-08-14 15:49 Bernt Hansen
  0 siblings, 0 replies; 4+ messages in thread
From: Bernt Hansen @ 2007-08-14 15:49 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten and list,

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

* Task 1
  :PROPERTIES:
  :time: 10m
  :END:

I'd like to define :time_ALL: globally since my estimated task durations
always fit into a set of values I'd like to share across all my org-mode
buffers.

I'd like to globally set up

  :time_ALL: 10m 30m 1h 2h 4h 6h 12h 18h 24h 30h

so I can just use S-left and S-right to change the value for any task in
any org-mode buffer to select the appropriate estimated time for the
task.

I would prefer not to have to set this same :time_ALL: value in all of
my level 1 headers in each of my org-mode buffers since that is a lot of
duplication and this value is always the same -- if I ever want to
change the value I'll want it to apply globally across all of my
org-mode buffers.

Is there a way to do this?

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?

Regards,
Bernt

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

* Property Drawer question
@ 2007-08-14 15:51 Bernt Hansen
  2007-08-14 22:25 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Bernt Hansen @ 2007-08-14 15:51 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten and list,

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

* Task 1
  :PROPERTIES:
  :time: 10m
  :END:

I'd like to define :time_ALL: globally since my estimated task durations
always fit into a set of values I'd like to share across all my org-mode
buffers.

I'd like to globally set up

  :time_ALL: 10m 30m 1h 2h 4h 6h 12h 18h 24h 30h

so I can just use S-left and S-right to change the value for any task in
any org-mode buffer to select the appropriate estimated time for the
task.

I would prefer not to have to set this same :time_ALL: value in all of
my level 1 headers in each of my org-mode buffers since that is a lot of
duplication and this value is always the same -- if I ever want to
change the value I'll want it to apply globally across all of my
org-mode buffers.

Is there a way to do this?

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?

Regards,
Bernt

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

* Re: Property Drawer question
  2007-08-14 15:51 Property Drawer question Bernt Hansen
@ 2007-08-14 22:25 ` Bastien
  2007-08-14 23:57   ` Bernt Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2007-08-14 22:25 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hello,

Bernt Hansen <bernt@alumni.uwaterloo.ca> 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

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

* Re: Property Drawer question
  2007-08-14 22:25 ` Bastien
@ 2007-08-14 23:57   ` Bernt Hansen
  0 siblings, 0 replies; 4+ messages in thread
From: Bernt Hansen @ 2007-08-14 23:57 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:

> Bernt Hansen <bernt@alumni.uwaterloo.ca> 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,

Thanks!

I'll try that out.  My lisp-foo isn't very strong yet :)

Bernt

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

end of thread, other threads:[~2007-08-14 23:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-14 15:51 Property Drawer question Bernt Hansen
2007-08-14 22:25 ` Bastien
2007-08-14 23:57   ` Bernt Hansen
  -- strict thread matches above, loose matches on Subject: below --
2007-08-14 15:49 Bernt Hansen

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