From mboxrd@z Thu Jan 1 00:00:00 1970 From: lecodesportif@eml.cc Subject: Re: Using properties for diary-anniversaries Date: Sun, 23 Jan 2011 15:04:04 -0800 Message-ID: <1295823844.21714.1416817301@webmail.messagingengine.com> References: <1295793360.20637.1416756473@webmail.messagingengine.com> <334.1295816634@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=51349 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ph8ye-0002dk-RA for emacs-orgmode@gnu.org; Sun, 23 Jan 2011 18:04:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ph8yd-0007F5-LH for emacs-orgmode@gnu.org; Sun, 23 Jan 2011 18:04:08 -0500 Received: from new1.smtp.messagingengine.com ([66.111.4.221]:53653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ph8yd-0007El-EX for emacs-orgmode@gnu.org; Sun, 23 Jan 2011 18:04:07 -0500 In-Reply-To: <334.1295816634@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 Sun, 23 Jan 2011 16:03 -0500, "Nick Dokos" wrote: > lecodesportif@eml.cc wrote: > > > > > I have an anniversary list in Org Mode where entries have this format: > > > > * John > > :PROPERTIES: > > :Name: John > > :Birthday: 5 4 1900 > > :END: > > > > I would like to add the "Birthday" and "Name" properties to Org Agenda > > automatically. What I have so far is: > > > > %%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) John > > > > When I enter this line right after the properties, the anniversary is > > added at the correct date in the agenda. But I still have to enter the > > name manually. > > > > Is there a way to have the "Name" property added to the diary text > > automatically? Can this be done for all entries in the list by adding > > code at the top of the org file? > > Not really an answer to your question - it's a different method that I > find convenient. I use bbdb for contacts and so I prefer to add > birthday/anniversary information to selected bbdb entries. Then one of > the org files in my org-agenda-files includes the following entry: > > --8<---------------cut here---------------start------------->8--- > #+CATEGORY: Anniv > %%(org-bbdb-anniversaries) > --8<---------------cut here---------------end--------------->8--- > > This causes entries in my agenda like this: > > ,---- > | Friday 28 January 2011 > | ... > | Anniv: Birthday: [[bbdb:John][John (32nd)]] > `---- > > with a link to the bbdb entry that you can open with org-open-at-point > to get more information (e.g. an email address that you can send > birthday wishes to). > > The bbdb entry for "John" is presented by bbdb like this: > > John: > net: john@foo.com > anniversary: 1979-01-28 birthday > 2009-02-28 wedding > > and the entry in the bbdb database looks like this: > > ["John" nil nil nil nil ("john@foo.com") ((creation-date . "...") > (timestamp . "...") (anniversary . "1979-01-22 birthday\n2009-02-28 > wedding") ...) nil] > > The only difficulty was how to enter multiple anniversaries into an entry > (as above): when you visit a bbdb entry, you create a new field with > ``C-o'' > called ``anniversary'' (bbdb knows about it and conveniently provides > completion) > or edit the existing ``anniversary'' field with ``e''. The value is > entered literally, > except that you have to quote any newlines, so you type: > > 1979-01-28 birthday C-q C-j 2009-02-28 wedding > > I added some spaces for readability above but you should *not* type any > spaces > except those explicitly called out as . Thanks for the explanations. In fact I once had a look at BBDB but found it too difficult to use. Then I decided to manage contacts using org files only which is working well so far. The anniversary list is part of that. I really hope to get an automatic interaction between the properties and the agenda. If I give up on that, I may have to use BBDB. -- http://www.fastmail.fm - A no graphics, no pop-ups email service