Next: Date Formats, Previous: Displaying the Diary, Up: Diary
Your diary file is a file that records events associated with
particular dates. The name of the diary file is specified by the
variable diary-file
; ~/diary is the default. The
calendar
utility program supports a subset of the format allowed
by the Emacs diary facilities, so you can use that utility to view the
diary file, with reasonable results aside from the entries it cannot
understand.
Each entry in the diary file describes one event and consists of one or more lines. An entry always begins with a date specification at the left margin. The rest of the entry is simply text to describe the event. If the entry has more than one line, then the lines after the first must begin with whitespace to indicate they continue a previous entry. Lines that do not begin with valid dates and do not continue a preceding entry are ignored.
You can also use a format where the first line of a diary entry consists only of the date or day name (with no following blanks or punctuation). For example:
02/11/2012 Bill B. visits Princeton today 2pm Cognitive Studies Committee meeting 2:30-5:30 Liz at Lawrenceville 4:00pm Dentist appt 7:30pm Dinner at George's 8:00-10:00pm concert
This entry will have a different appearance if you use the simple diary display (see Diary Display). The simple diary display omits the date line at the beginning; only the continuation lines appear. This style of entry looks neater when you display just a single day's entries, but can cause confusion if you ask for more than one day's entries.
You can inhibit the marking of certain diary entries in the calendar
window; to do this, insert the string that
diary-nonmarking-symbol
specifies (default ‘&’) at the
beginning of the entry, before the date. This
has no effect on display of the entry in the diary window; it only
affects marks on dates in the calendar window. Nonmarking entries are
especially useful for generic entries that would otherwise mark many
different dates.