ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial

38.15.8 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.

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.

blog comments powered by Disqus