Next: Sexp Diary Entries, Previous: Diary Display, Up: Advanced Calendar/Diary Usage [Contents][Index]

#### 31.15.9 Fancy Diary Display

The following features only work with the fancy diary display.

You can use the normal hook `diary-list-entries-hook` to sort each day’s diary entries by their time of day. Here’s how:

    (add-hook 'diary-list-entries-hook 'diary-sort-entries t)

For each day, this sorts diary entries that begin with a recognizable time of day according to their times. Diary entries without times come first within each day. Note how the sort command is placed at the end of the hook list, in case earlier members of the list change the order of the diary entries, or add items.

You can write ‘`comments`’ in diary entries, by setting the variables `diary-comment-start` and `diary-comment-end` to strings that delimit comments. The fancy display does not print comments. You might want to put meta-data for the use of other packages (e.g., the appointment package, see Appointments) inside comments.

Your main diary file can include other files. This permits a group of people to share a diary file for events that apply to all of them. Lines in the diary file starting with `diary-include-string`:

    #include "filename"

include the diary entries from the file filename in the fancy diary buffer. The include mechanism is recursive, so that included files can include other files, and so on (you must be careful not to have a cycle of inclusions, of course). Here is how to enable the include facility:

    (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
    (add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files)

The include mechanism works only with the fancy diary display, because simple diary display shows the entries directly from your diary file.

Next: Sexp Diary Entries, Previous: Diary Display, Up: Advanced Calendar/Diary Usage [Contents][Index]