@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
-@c 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
+@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
-@node Calendar/Diary, Gnus, Dired, Top
+@node Calendar/Diary, Document View, Dired, Top
@chapter The Calendar and the Diary
@cindex calendar
@findex calendar
* Lunar Phases:: Displaying phases of the moon.
* Other Calendars:: Converting dates to other calendar systems.
* Diary:: Displaying events from your diary.
-* Appointments:: Reminders when it's time to do something.
+* Appointments:: Reminders when it's time to do something.
* Importing Diary:: Converting diary events to/from other formats.
* Daylight Saving:: How to specify when daylight saving time is active.
* Time Intervals:: Keeping track of time intervals.
@item <
Scroll calendar one month backward (@code{calendar-scroll-right}).
@item C-v
-@itemx @key{NEXT}
+@itemx @key{next}
Scroll calendar three months forward
(@code{calendar-scroll-left-three-months}).
@item M-v
-@itemx @key{PRIOR}
+@itemx @key{prior}
Scroll calendar three months backward
(@code{calendar-scroll-right-three-months}).
@end table
by four, typing @kbd{C-u C-v} scrolls the calendar forward by a year and
typing @kbd{C-u M-v} scrolls the calendar backward by a year.
- The function keys @key{NEXT} and @key{PRIOR} are equivalent to
+ The function keys @key{next} and @key{prior} are equivalent to
@kbd{C-v} and @kbd{M-v}, just as they are in other modes.
@node Counting Days
@vindex calendar-mark-holidays-flag
To view the distribution of holidays for all the dates shown in the
calendar, use the @kbd{x} command. This displays the dates that are
-holidays in a different face (or places a @samp{*} after these dates, if
-a color display is not available, or if @code{font-lock-mode} is off).
+holidays in a different face.
@iftex
@inforef{Calendar Customizing, calendar-holiday-marker, emacs-xtra}.
@end iftex
and from several other calendars.
@menu
-* Calendar Systems:: The calendars Emacs understands
- (aside from Gregorian).
-* To Other Calendar:: Converting the selected date to various calendars.
-* From Other Calendar:: Moving to a date specified in another calendar.
-* Mayan Calendar:: Moving to a date specified in a Mayan calendar.
+* Calendar Systems:: The calendars Emacs understands
+ (aside from Gregorian).
+* To Other Calendar:: Converting the selected date to various calendars.
+* From Other Calendar:: Moving to a date specified in another calendar.
+* Mayan Calendar:: Moving to a date specified in a Mayan calendar.
@end menu
@node Calendar Systems
@menu
* Displaying the Diary:: Viewing diary entries and associated calendar dates.
* Format of Diary File:: Entering events in your diary.
-* Date Formats:: Various ways you can specify dates.
-* Adding to Diary:: Commands to create diary entries.
+* Date Formats:: Various ways you can specify dates.
+* Adding to Diary:: Commands to create diary entries.
* Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc.
@end menu
@subsection Displaying the Diary
Once you have created a diary file, you can use the calendar to view
-it. You can also view today's events outside of Calendar mode.
+it. You can also view today's events outside of Calendar mode. In the
+following, key bindings refer to the Calendar buffer.
@table @kbd
@item d
@vindex calendar-view-diary-initially-flag
Displaying the diary entries with @kbd{d} shows in a separate window
the diary entries for the selected date in the calendar. The mode line
-of the new window shows the date of the diary entries and any holidays
-that fall on that date. If you specify a numeric argument with @kbd{d},
-it shows all the diary entries for that many successive days. Thus,
-@kbd{2 d} displays all the entries for the selected date and for the
-following day.
+of the new window shows the date of the diary entries. Holidays are
+shown either in the buffer or in the mode line, depending on the display
+method you choose
+@iftex
+(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Diary Display}).
+@end ifnottex
+If you specify a numeric argument with @kbd{d}, it shows all the diary
+entries for that many successive days. Thus, @kbd{2 d} displays all the
+entries for the selected date and for the following day.
Another way to display the diary entries for a date is to click
@kbd{Mouse-3} on the date, and then choose @kbd{Diary entries} from
@findex diary-mark-entries
@vindex calendar-mark-diary-entries-flag
To get a broader view of which days are mentioned in the diary, use
-the @kbd{m} command. This displays the dates that have diary entries in
-a different face (or places a @samp{+} after these dates, if display
-with multiple faces is not available).
+the @kbd{m} command. This marks the dates that have diary entries in
+a different face.
@iftex
@inforef{Calendar Customizing, diary-entry-marker, emacs-xtra}.
@end iftex
To see the full diary file, rather than just some of the entries, use
the @kbd{s} command.
- Display of selected diary entries uses invisible text to hide entries
-that don't apply. The diary buffer as you see it is an illusion, so
-simply printing the buffer does not print what you see on your screen.
-There is a special command to print hard copy of the diary buffer
-@emph{as it appears}; this command is @kbd{M-x diary-print-entries}.
-It sends the data directly to the printer. You can customize it
-like @code{lpr-region} (@pxref{Printing}).
-
@findex diary
The command @kbd{M-x diary} displays the diary entries for the current
date, independently of the calendar display, and optionally for the next
If you put @code{(diary)} in your @file{.emacs} file, this
automatically displays a window with the day's diary entries, when you
-enter Emacs. The mode line of the displayed window shows the date and
-any holidays that fall on that date.
+enter Emacs.
@findex diary-mail-entries
@vindex diary-mail-days
entry. Lines that do not begin with valid dates and do not continue a
preceding entry are ignored.
-@vindex diary-nonmarking-symbol
- You can inhibit the marking of certain diary entries in the calendar
-window; to do this, insert an ampersand @code{diary-nonmarking-symbol}
-(default @samp{&}) at the beginning of the entry, before the date. This
-has no effect on display of the entry in the diary window; it affects
-only marks on dates in the calendar window. Nonmarking entries are
-especially useful for generic entries that would otherwise mark many
-different dates.
-
- If the first line of a diary entry consists only of the date or day
-name with no following blanks or punctuation, then the diary window
-display doesn't include that line; only the continuation lines appear.
-For example, this entry:
+ You can also use a format where the first line of a diary entry
+consists only of the date or day name (with no following blanks or
+punctuation). For example:
@example
02/11/1989
@end example
@noindent
-appears in the diary window without the date line at the beginning.
-This style of entry looks neater when you display just a single day's
-entries, but can cause confusion if you ask for more than one day's
-entries.
-
- You can edit the diary entries as they appear in the window, but it is
-important to remember that the buffer displayed contains the @emph{entire}
-diary file, with portions of it concealed from view. This means, for
-instance, that the @kbd{C-f} (@code{forward-char}) command can put point
-at what appears to be the end of the line, but what is in reality the
-middle of some concealed line.
+This entry will have a different appearance if you use the simple diary
+display
+@iftex
+(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Diary Display}).
+@end ifnottex
+The simple diary display omits the date line at the beginning; only the
+continuation lines appear. This style of entry looks neater when you
+display just a single day's entries, but can cause confusion if you ask
+for more than one day's entries.
- @emph{Be careful when editing the diary entries!} Inserting
-additional lines or adding/deleting characters in the middle of a
-visible line cannot cause problems, but editing at the end of a line may
-not do what you expect. Deleting a line may delete other invisible
-entries that follow it. Before editing the diary, it is best to display
-the entire file with @kbd{s} (@code{diary-show-all-entries}).
+@vindex diary-nonmarking-symbol
+ You can inhibit the marking of certain diary entries in the calendar
+window; to do this, insert an ampersand @code{diary-nonmarking-symbol}
+(default @samp{&}) at the beginning of the entry, before the date. This
+has no effect on display of the entry in the diary window; it affects
+only marks on dates in the calendar window. Nonmarking entries are
+especially useful for generic entries that would otherwise mark many
+different dates.
@node Date Formats
@subsection Date Formats
respectively.
@findex appt-activate
- To enable appointment notification, use the command @kbd{M-x
-appt-activate}. With a positive argument, it enables notification;
-with a negative argument, it disables notification; with no argument,
-it toggles. Enabling notification also sets up an appointment list
-for today from the diary file, giving all diary entries found with
-recognizable times of day, and reminds you just before each of them.
+ To enable appointment notification, type @kbd{M-x appt-activate}.
+With a positive argument, it enables notification; with a negative
+argument, it disables notification; with no argument, it toggles.
+Enabling notification also sets up an appointment list for today from
+the diary file, giving all diary entries found with recognizable times
+of day, and reminds you just before each of them.
For example, suppose the diary file contains these lines:
@end example
@vindex appt-message-warning-time
+@vindex appt-warning-time-regexp
@noindent
Then on Mondays, you will be reminded at around 9:20am about your
coffee break and at around 11:50am about lunch. The variable
@code{appt-message-warning-time} specifies how many minutes (default 12)
-in advance to warn you.
+in advance to warn you. This is a default warning time. Each
+appointment can specify a different warning time by adding a piece
+matching @code{appt-warning-time-regexp} (see that variable's
+documentation for details).
You can write times in am/pm style (with @samp{12:00am} standing
for midnight and @samp{12:00pm} standing for noon), or 24-hour
time by re-enabling appointment notification. Both these actions also
display the day's diary buffer, unless you set
@code{appt-display-diary} to @code{nil}. The appointments list is
-also updated whenever the diary file is saved.
+also updated whenever the diary file (or a file it includes; see
+@iftex
+@inforef{Fancy Diary Display,, emacs-xtra})
+@end iftex
+@ifnottex
+@ref{Fancy Diary Display})
+@end ifnottex
+is saved.
@findex appt-add
@findex appt-delete
@ifnottex
@include cal-xtra.texi
@end ifnottex
-
-@ignore
- arch-tag: 4531ef09-9df3-449d-9c52-2b5a4a337f92
-@end ignore