Выбрать главу

If there are no diary entries for a given day, the diary is not displayed. If you start Emacs with two files so that you are editing in two windows, the diary is also not displayed.

If you have already put in a (calendar) entry in your .emacs file to have the calendar displayed automatically, the calendar supersedes the diary, and you'll have to remove the calendar if you prefer to see the diary instead.

To mark dates with diary entries in red, press m from the calendar. To remove the marks, press u. (This command removes highlighting for diary entries as well as for holidays.)

Table 5-5 summarizes the calendar and diary commands.

Table 5-5. Holiday and diary commands

Keystrokes Command name Action
p d calendar-print-day-of-year Display the day of the year this is (for example, Day 364 of 365).
p o calendar-print-other-dates Display information about this date for all calendars.
Space scroll-other-window Scroll the other window.
q exit-calendar Quit calendar.
a HolidaysFor Window list-calendar-holidays Display holidays for calendar period shown.
h HolidaysFor Cursor Date calendar-cursor-holidays In the minibuffer, display holiday information for the day the cursor is on.
x HolidaysMark mark-calendar-holidays Display holidays in a different typeface, color, or with an asterisk beside them.
u HolidaysUnmark Calendar calendar-unmark Remove marks for holidays and diary entries (opposite of x command).
i w DiaryInsert Weekly insert-weekly-diary-entry Add a weekly entry based on the day of the week.
i y DiaryInsert Yearly insert-yearly-diary-entry Add an annual entry.
i d DiaryInsert Daily insert-diary-entry Add an entry for a particular day.
i m DiaryInsert Monthly insert-monthly-diary-entry Add an entry for the day of the month.
i c DiaryInsert Cyclic insert-cyclic-diary-entry Add an entry to recur every n days.
i a DiaryInsert Anniversary insert-anniversary-diary-entry Add an annual entry (the year is included for reference).
i b DiaryInsert Block insert-block-diary-entry Add a block entry.
m mark-diary-entries Display diary entries in a different typeface, color, or with a plus sign beside them.
d view-diary-entries Display diary entries for the current date.
s DiaryShow All show-all-diary-entries Display diary file.
M-= calendar-count-days-region Count the number of days in a region.
M MoonLunar Phases calendar-phases-of-moon Display phases of the moon for a three-month period.
S calendar-sunrise-sunset Given longitude and latitude, display sunrise and sunset times for the current date.
C-Space or C-@ calendar-set-mark Mark regions by time rather than horizontally.

5.5.3 Problems You May Encounter