lecodespor...@eml.cc 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.


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to