views:

234

answers:

1

I am trying to have the "Birthday" property of an Org-mode contact entry added to the agenda automatically:

* John
  :PROPERTIES:
  :Name: John
  :Birthday: 5 4 1900
  :END:

This can be done manually for each entry using:

%%(diary-anniversary 5 4 1900) John's birthday

But I don't want to type the date twice. I would like to use the org-entry-get functionality to make diary-anniversary take the values of the Birthday and Name (see the bold text above) properties.

This is how I get the correct property values.

%%(org-entry-get nil "Name")
%%(org-entry-get nil "Birthday")

But after several attempts, I still haven't managed to put the values in variables and pass them correctly to diary-anniversary. Any ideas how to do it?

A: 

Some progress thanks to the Org-mode community! So far this is resulting in an entry at the correct date in the calendar using the following line:

%%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) (org-entry-get nil "Name")

However, the problem now is that the entry doesn't show the name but (kind of like I expected) the following string: (org-entry-get nil "Name")

I did not find a way to make the value of the "Name" property show up in the calendar. So my workaround for that is to add the text to be displayed in the calendar manually at the end of the line:

%%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) Elvis Presley's birthday
lecodesportif