I'm using the icalendar export built into org-mode to export my agenda to an ical file. I also use org-bbdb to insert birthdays (anniversaries) into the agenda. Using the variable org-icalendar-include-bbdb-anniversaries, these anniversaries are exported to the ical file, which is great.

The problem is that the format of these birthday entries is not customizable. I traced back the formatting of the org-bbdb entries to the ical entries to the function org-bbdb-format-vevent, defined in org-bbdb.el. Can I overwrite or modify this function without patching org-bbdb.el? If so, what's the recommended way to do that?

  • For rewriting a function, it is generally sufficient to require the library that contains the original function and then (below that require statement) you can have a new function with the same function name as the old one that does whatever you want. You could also create a new function and then use defalias -- the same procedure regarding having a require statement beforehand is generally used. And you could also use advice as BrianZ suggested in his answer below -- if the feature can be corrected by adding something before or after the original function, but not in-between. – lawlist Jan 18 '16 at 17:47
  • See Preferred method of overriding an emacs lisp function?: stackoverflow.com/a/15725437/2112489 – lawlist Jan 18 '16 at 21:06

I'm not sure about the formatting in bbdb specifically, but it sounds like you are looking to "advise" org-bbdb-format-vevent. Check out the manual which has a section on this topic.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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