1. Let the file ~/diary consist of the line between start and end: -----start #include "~/test" end------ 2. Let ~/test be readable; it's content is irrelevant (can be empty). 3. Let ~/.emacs consist of the lines between start and end: -----start (add-hook 'find-file-hook (lambda () (set-window-buffer (selected-window) (set-buffer (current-buffer))))) (custom-set-variables '(calendar-mark-diary-entries-flag t) '(calendar-today-visible-hook (quote (calendar-mark-today))) '(diary-list-entries-hook (quote (diary-include-other-diary-files))) '(diary-mark-entries-hook (quote (diary-mark-included-diary-files)))) end------ 4. Invoke emacs (without -Q) 5. Type `M-x calendar RET' => Wrong type argument: number-or-marker-p, nil The Calendar is displayed in the lower window, but today's date is not marked, and the cursor is at the beginning of the buffer. Here is the backtrace from entering the debugger on error: