From mboxrd@z Thu Jan 1 00:00:00 1970 From: lecodesportif@eml.cc Subject: Re: Using properties for diary-anniversaries Date: Tue, 25 Jan 2011 07:22:23 -0800 Message-ID: <1295968943.2990.1417139069@webmail.messagingengine.com> 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> <11085.1295967908@gamaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=54407 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Phkix-0000sD-Ls for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 10:22:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Phkiv-0004i1-3Z for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 10:22:27 -0500 Received: from new1.smtp.messagingengine.com ([66.111.4.221]:48307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Phkiu-0004hj-Tn for emacs-orgmode@gnu.org; Tue, 25 Jan 2011 10:22:25 -0500 In-Reply-To: <11085.1295967908@gamaville.dokosmarshall.org> 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: Nick Dokos Cc: emacs-orgmode@gnu.org On Tue, 25 Jan 2011 10:05 -0500, "Nick Dokos" wrote: > 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--- I'm using it this way right now. An automatic way to fill in the names would help if the file had many entries. A single sexp for the whole file would be even more convenient. > PS. BTW, I believe the %% has to be flush left: you cannot indent it. At > least the manual says so. It's working with this indentation: * Jane :PROPERTIES: :Name: Jane :Birthday: (5 4 1901) :END: %%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) Jane -- http://www.fastmail.fm - Access your email from home and the web