From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Leech-Pepin Subject: Re: How to set up anniversaries/birthdays with org-contacts-anniversaries? Date: Tue, 8 Nov 2011 18:37:52 -0500 Message-ID: References: <49FF00AC-D45D-41ED-95A9-98C771F52282@math.ethz.ch> <32789D68-74E0-4B80-9C17-BB9C405535F9@math.ethz.ch> <4660.1320787996@alphaville.americas.hpqcorp.net> <545524F1-AC54-4ADB-8EDA-6AA4BBAA551E@math.ethz.ch> <5493.1320790042@alphaville.americas.hpqcorp.net> <81sjlykzwm.fsf@gmail.com> <3DF8E988-B416-43D2-BFEB-D83C31216C14@math.ethz.ch> <6927.1320793592@alphaville.americas.hpqcorp.net> <7507.1320794479@alphaville.americas.hpqcorp.net> <14423F95-5C91-4915-9C11-1F6F9E45ACC3@math.ethz.ch> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6dd89e8fa3e1a04b141a88b Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNvEp-0002PX-RF for emacs-orgmode@gnu.org; Tue, 08 Nov 2011 18:37:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNvEo-0007uB-8Y for emacs-orgmode@gnu.org; Tue, 08 Nov 2011 18:37:55 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:44742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNvEo-0007tu-43 for emacs-orgmode@gnu.org; Tue, 08 Nov 2011 18:37:54 -0500 Received: by wyg24 with SMTP id 24so1299470wyg.0 for ; Tue, 08 Nov 2011 15:37:52 -0800 (PST) In-Reply-To: <14423F95-5C91-4915-9C11-1F6F9E45ACC3@math.ethz.ch> 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: Marius Hofert Cc: nicholas.dokos@hp.com, Emacs help , Jambunathan K --0016e6dd89e8fa3e1a04b141a88b Content-Type: text/plain; charset=ISO-8859-1 :BIRTHDAY: without any date is an invalid date for the sexp. org-contacts-anniversaries loops through all valid contacts (headlines with an :EMAIL: property) for any that contain the :BIRTHDAY: property (by default, this can be customized). When there is no date associated the value is nil. (calendar-gregorian-from-absolute (org-time-string-to-absolute anniv)) Where anniv is the date retrieved from :BIRTHDAY:. nil is not a valid date, so the expression fails, giving you a bad sexp. On Tue, Nov 8, 2011 at 6:25 PM, Marius Hofert wrote: > >>> (load-library "diary") > >>> > >>> This calls the function load-library with the string argument "diary". > >>> This form can be added to .emacs. Alternatively, you can use the > >>> require form that I posted: > >>> > >>> (require 'diary) > >> > >> I obtain (also for (load-library "diary") ): > >> File error: Cannot open load file, diary > >> > >> I assume I'm missing some diary.el (?). > >> > > > > Nope, I'm wrong: diary-anniversary is in diary-lib, so the > > correct form is > > > > (load-library "diary-lib") > > > > or > > > > (require 'diary-lib) > > > okay, that's also what I tried and it worked. However, I still see the > "Bad sexp..." error when there is a BIRTHDAY tag *without* date, so just a > line containing ":BIRTHDAY:" But that's of course not a big issue. > > > --0016e6dd89e8fa3e1a04b141a88b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
:BIRTHDAY: without any date is an invalid date for the sexp.
=

org-contacts-anniversaries loops through all valid cont= acts (headlines with an :EMAIL: property) for any that contain the :BIRTHDA= Y: property (by default, this can be customized).

When there is no date associated the value is nil.

(calendar-gregorian-from-absolute
=A0 = (org-time-string-to-absolute anniv))

Where anniv is the date retrieved from :BIRTHDAY:. nil is not a valid date,= so the expression fails, giving you a bad sexp.

On Tue, Nov 8, 2011 at 6:25 PM, Marius Hofert &= lt;marius.hofert@math.ethz.ch= > wrote:
>>> (load-l= ibrary "diary")
>>>
>>> This calls the function load-library with the string argument = "diary".
>>> This form can be added to .emacs. Alternatively, you can use t= he
>>> require form that I posted:
>>>
>>> (require 'diary)
>>
>> I obtain (also for (load-library "diary") ):
>> File error: Cannot open load file, diary
>>
>> I assume I'm missing some diary.el (?).
>>
>
> Nope, I'm wrong: diary-anniversary is in diary-lib, so the
> correct form is
>
> (load-library "diary-lib")
>
> or
>
> (require 'diary-lib)


okay, that's also what I tried and it worked. However, I st= ill see the "Bad sexp..." error when there is a BIRTHDAY tag *wit= hout* date, so just a line containing ":BIRTHDAY:" But that's= of course not a big issue.



--0016e6dd89e8fa3e1a04b141a88b--