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

Including Other Diary Files

If you use the fancy diary display, you can have diary entries from other files included with your own by an "include" mechanism. This facility makes possible the sharing of common diary files among groups of users. Lines in the diary file of the form

#include "filename"

cause the diary entries in the file filename to included in the fancy diary buffer (because the ordinary diary buffer is just the buffer associated with your diary file, you cannot use the include mechanism unless you use the fancy diary buffer). The include mechanism is recursive, by the way, so that included files can cause other files to be included, and so on; you must be careful not to have a cycle of inclusions, of course. To obtain the include facility, add lines as follows:

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

to your `.emacs' file.

To have both included files and sorted diary entries, use the lines

(setq list-diary-entries-hook
      '(include-other-diary-files
        (lambda nil
          (setq diary-entries-list
                (sort diary-entries-list 'diary-entry-compare)))))
(setq mark-diary-entries-hook 'mark-included-diary-files)

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