From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Using properties for diary-anniversaries Date: Tue, 25 Jan 2011 10:05:08 -0500 Message-ID: <11085.1295967908@gamaville.dokosmarshall.org> References: <1295793360.20637.1416756473@webmail.messagingengine.com><7298.1295831795@gamaville.dokosmarshall.org><1295857674.26398.1416871253@webmail.messagingengine.com> <26027.1295879818@gamaville.dokosmarshall.org> <1295961439.28177.1417118385@webmail.messagingengine.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=43988 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhkSL-0001LV-MO for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 10:05:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhkSE-00089u-VX for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 10:05:12 -0500 Received: from vms173019pub.verizon.net ([206.46.173.19]:58847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhkSE-00089e-SI for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 10:05:10 -0500 Received: from gamaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173019.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LFL004DW38KG430@vms173019.mailsrvcs.net> for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 09:05:09 -0600 (CST) In-reply-to: Message from lecodesportif@eml.cc of "Tue, 25 Jan 2011 05:17:19 PST." <1295961439.28177.1417118385@webmail.messagingengine.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: lecodesportif@eml.cc Cc: Nick Dokos , emacs-orgmode@gnu.org lecodesportif@eml.cc wrote: > Yes, it may require hacking diary-anniversary. > One more thing before I turn into a pumpkin: what happens if you have multiple entries (John's birthday, Mary's wedding anniversary, Jane's birthday *and* her wedding anniversary, etc.) Are you expecting to deal with all of them with a single diary sexp? org-entry-get with a POM argument of nil will only look around for the "nearest" entry (for some definition of "nearest"). So it seems to me you are going to have one of these sexps after each and every entry (and you may have to add an "Anniversary" property as well and search for that in addition to "Birthday"). But then why would you need an automatic way to fill in the name? You can just add a person-specific string to each person-specific diary sexp and be done with it. For example, --8<---------------cut here---------------start------------->8--- * John :PROPERTIES: :Name: John :Birthday: (5 4 1900) :END: %%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) John * Jane :PROPERTIES: :Name: Jane :Birthday: (5 4 1901) :END: %%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) Jane --8<---------------cut here---------------end--------------->8--- Nick PS. BTW, I believe the %% has to be flush left: you cannot indent it. At least the manual says so.