Matt Lundin <m...@imapmail.org> writes: > Julien Cubizolles <j.cubizol...@free.fr> writes: > >> I'm using org-bbdb-anniversaries to use the bbdb-anniversaries. At the >> moment, it only displays the birthdays of the day. How can I generate a >> reminder for a few days before the actual birthday ? > > This is not possible at the moment with bbdb-anniversaries. > > For advanced reminders of birthdays and the like, you could use a > diary-sexp: > > %%(diary-remind '(org-anniversary 1996 8 20) -7) Someone turns %s >
org-bbdb-anniversaries depends on having a dynamically bound variable called 'date' in the format (month day year) and produces the list of anniversaries for that particular date. Instead of doing %%(org-bbdb-anniversaries) you could do %%(let ((date '(9 1 2015))) (org-bbdb-anniversaries)) which produces the anniversaries for 2015-09-01, no matter what the current date is. That's silly of course but you could take advantage of it as follows: you could define your own function and do %%(my-anniversaries) org-bbdb-anniversaries produces a list of strings, one string for each anniversary falling on the given date. So your function would have to calculate the list of dates that it wants anniversaries for, and for each date d in that list calculate the list of anniversaries for that date: (let ((date d)) (org-bbdb-anniversaries)) probably annotating each string in the resulting list with the date of the anniversary and accumulating it in a single list, which it would then return. Obviously lots of details are missing - nevertheless, I hope it helps a bit. Nick