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: Nick Dokos
Subject: Re: [Orgmode] Using properties for diary-anniversaries
Date: Tue, 25 Jan 2011 10:05:08 -0500

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

Nick

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




reply via email to

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