10

I have entries in my org file similar to:

* Birthdays
:PROPERTIES:
:CATEGORY: birthday
:END:
%%(org-anniversary 1981 1 2) Harry (%d)

What I would like is for these to appear in the agenda (say) 2 weeks before they're due, similar to how a deadline works.

Is that possible?

Drew
  • 75,699
  • 9
  • 109
  • 225
Dave F
  • 553
  • 2
  • 13
  • 1
    If I remember correctly, the agenda doesn't yet handle this form of date entry (which is frustrating). – Dan Apr 07 '16 at 12:37
  • 2
    I wrote up a modification a while back to programmatically have birthdays and holidays appear in the agenda view. http://emacs.stackexchange.com/questions/10871/programmatically-add-birthdays-holidays-to-agenda-view-in-org-mode You could modify the code in the answer to create duplicate entries at any interval prior to the birthday or holiday, and you could also change the colors to differentiate them, and you could also add some text -- "this is your 2 week prior notice . . ." :) I won't have any spare time until after the tax deadline to play with it, but your welcome to give it a whirl. – lawlist Apr 07 '16 at 16:07
  • Phew, that's quite a chunk of code! I only wanted it for one particular date, so it seems a bit overkill, thanks anyway though, much appreciated – Dave F Apr 13 '16 at 10:33

3 Answers3

1

You can do something similar to how deadline works with the diary-remind function:

%%(diary-remind '(org-anniversary 1981 1 2) -14) Harry is %d

which shows up in the agenda as:

Reminder: Only N days until Harry is 38
jagrg
  • 3,824
  • 4
  • 19
0

Why not set the variable org-scheduled-delay-days?

0

Related but not a direct answer to your question (unless you decide to switch :-) ): I use BBDB for anniversaries and then have this in one of my agenda files:

* Anniversaries
%%(org-bbdb-anniversaries-future)

By default it adds warnings to the agenda starting seven days in advance. You can change that by calling the function with an argument: (org-bbdb-anniversaries-future 4).

NickD
  • 27,023
  • 3
  • 23
  • 42