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

Customizing the Diary

Ordinarily, the mode line of the diary buffer window will indicate any holidays that fall on the date of the diary entries. The process of checking for holidays takes several seconds, so the display of the diary buffer is delayed slightly because the holiday information is included. If you'd prefer to have a faster display of the diary buffer but without the holiday information, set the variable holidays-in-diary-buffer to nil.

The variable number-of-diary-entries controls the number of days of diary entries that will be displayed initially (when view-diary-entries-initially is set to t) or with the command M-x diary. For example, if the default value 1 is used, then only the current day's diary entries will be displayed. If the value 2 is used, both the current day's and the next day's entries will be displayed. The value can also be a vector of seven elements: if the value is [0 2 2 2 2 4 1] then no diary entries will be displayed on Sunday, the current date's and the next day's diary entries will be displayed Monday through Thursday, Friday through Monday's entries will be displayed on Friday, while on Saturday only that day's entries will be displayed.

The variable print-diary-entries-hook is the list of functions called after a temporary buffer is prepared with the diary entries currently visible in the diary buffer. The default value of this hook adds a heading (composed from the diary buffer's mode line), does the printing with the command lpr-buffer, and kills the temporary buffer. If you want to use a different command to do the printing, just change the value of this hook. Other uses might include, for example, rearranging the lines into order by day and time.

You can customize the form of dates in your diary file if neither the standard American nor European styles suits your needs; to find out how, use C-h v diary-date-forms RET after entering the calendar. You can similarly customize the form in which dates are displayed in the diary, in mode lines, and in messages; use C-h v calendar-date-display-form RET after entering the calendar.


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