14

I am a beginner in org-mode (and Emacs, for that matter), but I thought that org-mode would be a good place/format to store my contacts. One thing I like to do is to add birthdays to contacts. I found org-contacts.el, which appears to have what I want: I add a person in contacts.org and add a birthday property.

* Ficitive Person
:PROPERTIES:
:EMAIL: [email protected]
:BIRTHDAY: 2000-09-24
:END:

Now in another file (agenda.org), I have the following:

* Birthday
%%(org-contacts-anniversaries)

When I press C-c a a (M-x org-agenda-list), I see their birthday and how old they are, cool!

However, for some people I know their birthday, but not their age. Still I'd like to see that it is their birthday on my calendar, but when I enter a birthday in any other format, I get an error:

Bad sexp at line 24 in [...]/org/agenda.org: (org-contacts-anniversaries)

Is there a format for inserting birthdays without knowing the year?

Like I said, I am an emacs noob, so if there is another better way than org-contacts (or org-mode, for that matter) I am happy to learn that way.

1
  • 4
    Does something tolerable like 0000 work in this situation as a workaround? See also this related thread entitled Programmatically add birthdays/holidays to agenda view in org-mode: emacs.stackexchange.com/a/10872/2287 The method described in the aforementioned link does not require a birth year.
    – lawlist
    Sep 25, 2015 at 14:18

1 Answer 1

4

org-contacts has one format for birthdays

BDAY:%04d-%02d-%02d,

which means 4 digits of year dash two digits of month dash two digits to day.

I can suggest to edit the format of the anniversary agenda entry. By default the format is:

Birthday: %l (%Y),

where %l - Link to the heading and %Y - Number of year (ordinal).

So you can put random year in the contact's birthday and edit line 110 in file org-contacts: remove (%Y) and result will be Birthday: Contact Name without years.

Another way than org-contacts described in comments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.