Go to the first, previous, next, last section, table of contents.

Sexp Entries and the Fancy Diary Display

Sexp diary entries are especially powerful when the fancy diary display is used because the function called can generate the text of the entry depending on the date itself. For example, the anniversary diary entry described above (see section Special Diary Entries (Sexps)) can insert the number of years since the anniversary date into the text of the diary entry. Thus the dairy entry

%%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)

will have the `%d' replaced by the age, so on October 31, 1990 the entry will appear in the fancy diary buffer as

Arthur's birthday (42 years old)

If the diary file instead contains the entry

%%(diary-anniversary 10 31 1948) Arthur's %d%s birthday

the entry in the fancy diary buffer for October 31, 1990 will be

Arthur's 42nd birthday

Similarly, cyclic diary entries can interpolate the number of repetitions that have occurred:

%%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)

will cause the diary entry

Renew medication (5th time)

to appear in the fancy diary display on September 8, 1990.

The following sexp diary entries take advantage of the ability (in the fancy diary display) to concoct diary entries based on the date:

%%(diary-day-of-year)
Make a diary entry with today's day number in the current year and the number of days remaining in the current year.
%%(diary-iso-date)
Make a diary entry with today's equivalent ISO commercial date.
%%(diary-hebrew-date)
Make a diary entry with today's equivalent date on the Hebrew calendar.
%%(diary-islamic-date)
Make a diary entry with today's equivalent date on the Islamic calendar.
%%(diary-french-date)
Make a diary entry with today's equivalent date on the French Revolutionary calendar.

Thus including the diary entry

&%%(diary-hebrew-date)

will cause every day's diary display to contain the equivalent date on the Hebrew calendar, if you are using the fancy diary display. (If you are not using the fancy diary display, you will simply see the line `&%%(diary-hebrew-date)' when your diary file is displayed with any day's diary entries.)

There are a number of other available sexp diary entries that are important to those who follow the Hebrew calendar:

%%(diary-rosh-hodesh)
Make a diary entry that tells the occurrence and ritual announcement of each new Hebrew month.
%%(diary-parasha)
Make a diary entry that tells the weekly synagogue scripture reading.
%%(diary-omer)
Make a diary entry that gives the omer count, when appropriate.
%%(diary-yahrzeit MONTH DAY YEAR) NAME
Make a diary entry marking the anniversary of a date of death. The date is the Gregorian (civil) date of death. The diary entry will appear on the proper Hebrew calendar anniversary and on the day before. (If the European style is used, the order of the parameters should be changed to DAY, MONTH, YEAR.)

Go to the first, previous, next, last section, table of contents.