emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Using properties for diary-anniversaries


From: lecodesportif
Subject: Re: [Orgmode] Using properties for diary-anniversaries
Date: Tue, 25 Jan 2011 07:22:23 -0800

On Tue, 25 Jan 2011 10:05 -0500, "Nick Dokos" <address@hidden>
wrote:
> address@hidden wrote:
> 
> 
> > Yes, it may require hacking diary-anniversary.
> > 
> 
> One more thing before I turn into a pumpkin: what happens if you have
> multiple entries (John's birthday, Mary's wedding anniversary, Jane's
> birthday *and* her wedding anniversary, etc.) Are you expecting to deal
> with all of them with a single diary sexp?  org-entry-get with a POM
> argument of nil will only look around for the "nearest" entry (for some
> definition of "nearest"). So it seems to me you are going to have one of
> these sexps after each and every entry (and you may have to add an
> "Anniversary" property as well and search for that in addition to
> "Birthday"). But then why would you need an automatic way to fill in the
> name?  You can just add a person-specific string to each person-specific
> diary sexp and be done with it. For example,
> 
> --8<---------------cut here---------------start------------->8---
> * John
>   :PROPERTIES:
>   :Name: John
>   :Birthday: (5 4 1900)
>   :END:
> 
> %%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) John
> 
> * Jane
>   :PROPERTIES:
>   :Name: Jane
>   :Birthday: (5 4 1901)
>   :END:
> 
> %%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) Jane
> --8<---------------cut here---------------end--------------->8---

I'm using it this way right now. An automatic way to fill in the names
would help if the file had many entries. A single sexp for the whole
file would be even more convenient.

> PS. BTW, I believe the %% has to be flush left: you cannot indent it. At
> least the manual says so.

It's working with this indentation:

* Jane
   :PROPERTIES:
   :Name: Jane
   :Birthday: (5 4 1901)
   :END:
   %%(apply 'diary-anniversary (read (org-entry-get nil "Birthday")))
   Jane

-- 
http://www.fastmail.fm - Access your email from home and the web




reply via email to

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