From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-bbdb-birthday reminder Date: Wed, 12 Aug 2015 21:36:58 -0400 Message-ID: <878u9gnf45.fsf@alphaville.dokosmarshall.org> References: <87a8ufdqte.fsf@free.fr> <871tf89qh8.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59328) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPhSE-0006WV-7u for emacs-orgmode@gnu.org; Wed, 12 Aug 2015 21:37:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPhSA-0003rK-6Q for emacs-orgmode@gnu.org; Wed, 12 Aug 2015 21:37:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:59529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPhS9-0003r5-Vm for emacs-orgmode@gnu.org; Wed, 12 Aug 2015 21:37:10 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZPhS5-0007Iz-7a for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 03:37:05 +0200 Received: from pool-108-20-41-232.bstnma.fios.verizon.net ([108.20.41.232]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Aug 2015 03:37:05 +0200 Received: from ndokos by pool-108-20-41-232.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 13 Aug 2015 03:37:05 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Matt Lundin writes: > Julien Cubizolles 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