From: lecodesportif@eml.cc
To: Nick Dokos <nicholas.dokos@hp.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Using properties for diary-anniversaries
Date: Tue, 25 Jan 2011 07:22:23 -0800 [thread overview]
Message-ID: <1295968943.2990.1417139069@webmail.messagingengine.com> (raw)
In-Reply-To: <11085.1295967908@gamaville.dokosmarshall.org>
On Tue, 25 Jan 2011 10:05 -0500, "Nick Dokos" <nicholas.dokos@hp.com>
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
prev parent reply other threads:[~2011-01-25 15:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-23 14:36 Using properties for diary-anniversaries lecodesportif
2011-01-23 21:03 ` Nick Dokos
2011-01-23 23:04 ` lecodesportif
2011-01-24 1:16 ` Nick Dokos
2011-01-24 8:27 ` lecodesportif
2011-01-24 14:36 ` Nick Dokos
2011-01-24 20:46 ` Adam
2011-01-24 21:02 ` Nick Dokos
2011-01-25 13:17 ` lecodesportif
2011-01-25 14:53 ` Nick Dokos
2011-01-25 15:05 ` Nick Dokos
2011-01-25 15:22 ` lecodesportif [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295968943.2990.1417139069@webmail.messagingengine.com \
--to=lecodesportif@eml.cc \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).