annotate man/xemacs/calendar.texi @ 939:025200a2163c

[xemacs-hg @ 2002-07-31 07:23:39 by michaels] 2002-07-17 Marcus Crestani <crestani@informatik.uni-tuebingen.de> Markus Kaltenbach <makalten@informatik.uni-tuebingen.de> Mike Sperber <mike@xemacs.org> configure flag to turn these changes on: --use-kkcc First we added a dumpable flag to lrecord_implementation. It shows, if the object is dumpable and should be processed by the dumper. * lrecord.h (struct lrecord_implementation): added dumpable flag (MAKE_LRECORD_IMPLEMENTATION): fitted the different makro definitions to the new lrecord_implementation and their calls. Then we changed mark_object, that it no longer needs a mark method for those types that have pdump descritions. * alloc.c: (mark_object): If the object has a description, the new mark algorithm is called, and the object is marked according to its description. Otherwise it uses the mark method like before. These procedures mark objects according to their descriptions. They are modeled on the corresponding pdumper procedures. (mark_with_description): (get_indirect_count): (structure_size): (mark_struct_contents): These procedures still call mark_object, this is needed while there are Lisp_Objects without descriptions left. We added pdump descriptions for many Lisp_Objects: * extents.c: extent_auxiliary_description * database.c: database_description * gui.c: gui_item_description * scrollbar.c: scrollbar_instance_description * toolbar.c: toolbar_button_description * event-stream.c: command_builder_description * mule-charset.c: charset_description * device-msw.c: devmode_description * dialog-msw.c: mswindows_dialog_id_description * eldap.c: ldap_description * postgresql.c: pgconn_description pgresult_description * tooltalk.c: tooltalk_message_description tooltalk_pattern_description * ui-gtk.c: emacs_ffi_description emacs_gtk_object_description * events.c: * events.h: * event-stream.c: * event-Xt.c: * event-gtk.c: * event-tty.c: To write a pdump description for Lisp_Event, we converted every struct in the union event to a Lisp_Object. So we created nine new Lisp_Objects: Lisp_Key_Data, Lisp_Button_Data, Lisp_Motion_Data, Lisp_Process_Data, Lisp_Timeout_Data, Lisp_Eval_Data, Lisp_Misc_User_Data, Lisp_Magic_Data, Lisp_Magic_Eval_Data. We also wrote makro selectors and mutators for the fields of the new designed Lisp_Event and added everywhere these new abstractions. We implemented XD_UNION support in (mark_with_description), so we can describe exspecially console/device specific data with XD_UNION. To describe with XD_UNION, we added a field to these objects, which holds the variant type of the object. This field is initialized in the appendant constructor. The variant is an integer, it has also to be described in an description, if XD_UNION is used. XD_UNION is used in following descriptions: * console.c: console_description (get_console_variant): returns the variant (create_console): added variant initialization * console.h (console_variant): the different console types * console-impl.h (struct console): added enum console_variant contype * device.c: device_description (Fmake_device): added variant initialization * device-impl.h (struct device): added enum console_variant devtype * objects.c: image_instance_description font_instance_description (Fmake_color_instance): added variant initialization (Fmake_font_instance): added variant initialization * objects-impl.h (struct Lisp_Color_Instance): added color_instance_type * objects-impl.h (struct Lisp_Font_Instance): added font_instance_type * process.c: process_description (make_process_internal): added variant initialization * process.h (process_variant): the different process types
author michaels
date Wed, 31 Jul 2002 07:23:39 +0000
parents 1ccc32a20af4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 @node Calendar/Diary, Sorting, Reading Mail, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @section Calendar Mode and the Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @cindex calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @findex calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 Emacs provides the functions of a desk calendar, with a diary of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 planned or past events. To enter the calendar, type @kbd{M-x calendar};
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 this displays a three-month calendar centered on the current month, with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 point on the current date. With a numeric argument, as in @kbd{C-u M-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 calendar}, it prompts you for the month and year to be the center of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 three-month calendar. The calendar uses its own buffer, whose major
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 mode is Calendar mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 @kbd{Button2} in the calendar brings up a menu of operations on a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 particular date; @kbd{Buttons3} brings up a menu of commonly used
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 calendar features that are independent of any particular date. To exit
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 the calendar, type @kbd{q}. @xref{Calendar, Customizing the Calendar
446
1ccc32a20af4 Import from CVS: tag r21-2-38
cvs
parents: 442
diff changeset
18 and Diary,, lispref, The XEmacs Lisp Reference Manual}, for customization
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 information about the calendar and diary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 * Calendar Motion:: Moving through the calendar; selecting a date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 * Scroll Calendar:: Bringing earlier or later months onto the screen.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 * Mark and Region:: Remembering dates, the mark ring.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 * General Calendar:: Exiting or recomputing the calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 * LaTeX Calendar:: Print a calendar using LaTeX.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 * Holidays:: Displaying dates of holidays.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 * Sunrise/Sunset:: Displaying local times of sunrise and sunset.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 * Lunar Phases:: Displaying phases of the moon.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 * Other Calendars:: Converting dates to other calendar systems.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 * Diary:: Displaying events from your diary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 * Calendar Customization:: Altering the behavior of the features above.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 @node Calendar Motion, Scroll Calendar, Calendar/Diary, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 @subsection Movement in the Calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 @cindex moving inside the calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 Calendar mode lets you move through the calendar in logical units of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 time such as days, weeks, months, and years. If you move outside the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 three months originally displayed, the calendar display ``scrolls''
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 automatically through time to make the selected date visible. Moving to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 a date lets you view its holidays or diary entries, or convert it to other
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 calendars; moving longer time periods is also useful simply to scroll the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 * Calendar Unit Motion:: Moving by days, weeks, months, and years.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 * Move to Beginning or End:: Moving to start/end of weeks, months, and years.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 * Specified Dates:: Moving to the current date or another
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 specific date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 @node Calendar Unit Motion, Move to Beginning or End, Calendar Motion, Calendar Motion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 @subsubsection Motion by Integral Days, Weeks, Months, Years
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 The commands for movement in the calendar buffer parallel the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 commands for movement in text. You can move forward and backward by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 days, weeks, months, and years.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 @item C-f
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 Move point one day forward (@code{calendar-forward-day}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 @item C-b
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 Move point one day backward (@code{calendar-backward-day}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 @item C-n
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 Move point one week forward (@code{calendar-forward-week}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 @item C-p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 Move point one week backward (@code{calendar-backward-week}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 @item M-@}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 Move point one month forward (@code{calendar-forward-month}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 @item M-@{
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 Move point one month backward (@code{calendar-backward-month}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 @item C-x ]
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 Move point one year forward (@code{calendar-forward-year}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 @item C-x [
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 Move point one year backward (@code{calendar-backward-year}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 @kindex C-f @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 @findex calendar-forward-day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 @kindex C-b @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 @findex calendar-backward-day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 @kindex C-n @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 @findex calendar-forward-week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 @kindex C-p @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 @findex calendar-backward-week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 The day and week commands are natural analogues of the usual Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 commands for moving by characters and by lines. Just as @kbd{C-n}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 usually moves to the same column in the following line, in Calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 mode it moves to the same day in the following week. And @kbd{C-p}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 moves to the same day in the previous week.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 The arrow keys are equivalent to @kbd{C-f}, @kbd{C-b}, @kbd{C-n} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 @kbd{C-p}, just as they normally are in other modes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 @kindex M-@} @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 @findex calendar-forward-month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 @kindex M-@{ @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 @findex calendar-backward-month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 @kindex C-x ] @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 @findex calendar-forward-year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 @kindex C-x [ @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 @findex calendar-forward-year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 The commands for motion by months and years work like those for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 weeks, but move a larger distance. The month commands @kbd{M-@}} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 @kbd{M-@{} move forward or backward by an entire month's time. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 year commands @kbd{C-x ]} and @w{@kbd{C-x [}} move forward or backward a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 whole year.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 The easiest way to remember these commands is to consider months and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 years analogous to paragraphs and pages of text, respectively. But the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 commands themselves are not quite analogous. The ordinary Emacs paragraph
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 commands move to the beginning or end of a paragraph, whereas these month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 and year commands move by an entire month or an entire year, which usually
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 involves skipping across the end of a month or year.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 All these commands accept a numeric argument as a repeat count.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 For convenience, the digit keys and the minus sign specify numeric
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 arguments in Calendar mode even without the Meta modifier. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 @kbd{100 C-f} moves point 100 days forward from its present location.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 @node Move to Beginning or End, Specified Dates, Calendar Unit Motion, Calendar Motion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 @subsubsection Beginning or End of Week, Month or Year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 A week (or month, or year) is not just a quantity of days; we think of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 weeks (months, years) as starting on particular dates. So Calendar mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 provides commands to move to the beginning or end of a week, month or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 year:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 @kindex C-a @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 @findex calendar-beginning-of-week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 @item C-a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 Move point to start of week (@code{calendar-beginning-of-week}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 @kindex C-e @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 @findex calendar-end-of-week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 @item C-e
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 Move point to end of week (@code{calendar-end-of-week}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 @kindex M-a @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 @findex calendar-beginning-of-month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 @item M-a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 Move point to start of month (@code{calendar-beginning-of-month}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 @kindex M-e @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 @findex calendar-end-of-month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 @item M-e
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 Move point to end of month (@code{calendar-end-of-month}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 @kindex M-< @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 @findex calendar-beginning-of-year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 @item M-<
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 Move point to start of year (@code{calendar-beginning-of-year}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 @kindex M-> @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 @findex calendar-end-of-year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 @item M->
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 Move point to end of year (@code{calendar-end-of-year}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 These commands also take numeric arguments as repeat counts, with the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 repeat count indicating how many weeks, months, or years to move
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 backward or forward.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 @vindex calendar-week-start-day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 @cindex weeks, which day they start on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 @cindex calendar, first day of week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 By default, weeks begin on Sunday. To make them begin on Monday
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 instead, set the variable @code{calendar-week-start-day} to 1.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 @node Specified Dates,,Move to Beginning or End, Calendar Motion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 @subsubsection Particular Dates
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 Calendar mode provides commands for moving to a particular date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 specified in various ways.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 @item g d
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 Move point to specified date (@code{calendar-goto-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 @item o
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 Center calendar around specified month (@code{calendar-other-month}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 @item .
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 Move point to today's date (@code{calendar-goto-today}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 @kindex g d @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 @findex calendar-goto-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 @kbd{g d} (@code{calendar-goto-date}) prompts for a year, a month, and a day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 of the month, and then moves to that date. Because the calendar includes all
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 dates from the beginning of the current era, you must type the year in its
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 entirety; that is, type @samp{1990}, not @samp{90}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 @kindex o @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 @findex calendar-other-month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 @kbd{o} (@code{calendar-other-month}) prompts for a month and year,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 then centers the three-month calendar around that month.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 @kindex . @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 @findex calendar-goto-today
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 You can return to today's date with @kbd{.}@:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 (@code{calendar-goto-today}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 @node Scroll Calendar, Mark and Region, Calendar Motion, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 @subsection Scrolling the Calendar through Time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 @cindex scrolling in the calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 The calendar display scrolls automatically through time when you move out
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 of the visible portion. You can also scroll it manually. Imagine that the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 calendar window contains a long strip of paper with the months on it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 Scrolling it means moving the strip so that new months become visible in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 the window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 @item C-x <
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 Scroll calendar one month forward (@code{scroll-calendar-left}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 @item C-x >
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 Scroll calendar one month backward (@code{scroll-calendar-right}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 @item C-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 @itemx @key{NEXT}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 Scroll calendar three months forward
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 (@code{scroll-calendar-left-three-months}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 @item M-v
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 @itemx @key{PRIOR}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 Scroll calendar three months backward
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 (@code{scroll-calendar-right-three-months}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 @kindex C-x < @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 @findex scroll-calendar-left
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 @kindex C-x > @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 @findex scroll-calendar-right
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 The most basic calendar scroll commands scroll by one month at a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 time. This means that there are two months of overlap between the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 display before the command and the display after. @kbd{C-x <} scrolls
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 the calendar contents one month to the left; that is, it moves the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 display forward in time. @kbd{C-x >} scrolls the contents to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 right, which moves backwards in time.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 @kindex C-v @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 @findex scroll-calendar-left-three-months
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 @kindex M-v @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 @findex scroll-calendar-right-three-months
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 The commands @kbd{C-v} and @kbd{M-v} scroll the calendar by an entire
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 ``screenful''---three months---in analogy with the usual meaning of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 these commands. @kbd{C-v} makes later dates visible and @kbd{M-v} makes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 earlier dates visible. These commands take a numeric argument as a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 repeat count; in particular, since @kbd{C-u} multiplies the next command
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 by four, typing @kbd{C-u C-v} scrolls the calendar forward by a year and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 typing @kbd{C-u M-v} scrolls the calendar backward by a year.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 The function keys @key{NEXT} and @key{PRIOR} are equivalent to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 @kbd{C-v} and @kbd{M-v}, just as they are in other modes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 @node Mark and Region, General Calendar, Scroll Calendar, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 @subsection The Mark and the Region
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 The concept of the mark applies to the calendar just as to any other
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 buffer, but it marks a @emph{date}, not a @emph{position} in the buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 The region consists of the days between the mark and point (including
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 the starting and stopping dates).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 @item C-SPC
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 Set the mark to today's date (@code{calendar-set-mark}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 @item C-@@
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 The same.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 @item C-x C-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 Interchange mark and point (@code{calendar-exchange-point-and-mark}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 @item M-=
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 Display the number of days in the current region
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 (@code{calendar-count-days-region}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 @kindex C-@@ @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 @kindex C-SPC @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 @findex calendar-set-mark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 @kindex C-x C-x @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 @findex calendar-exchange-point-and-mark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 You set the mark in the calendar, as in any other buffer, by using @kbd{C-@@}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 or @kbd{C-SPC} (@code{calendar-set-mark}). You return to the marked date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 with the command @kbd{C-x C-x} (@code{calendar-exchange-point-and-mark})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 which puts the mark where point was and point where mark was. The calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 is scrolled as necessary, if the marked date was not visible on the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 screen. This does not change the extent of the region.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 @kindex M-= @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 @findex calendar-count-days-region
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 To determine the number of days in the region, type @kbd{M-=}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 (@code{calendar-count-days-region}). The numbers of days printed is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 @emph{inclusive}; that is, it includes the days specified by mark and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 point.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 @cindex mark ring
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 The main use of the mark in the calendar is to remember dates that you may
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 want to go back to. To make this feature more useful, the mark ring
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 (@pxref{Mark Ring}) operates exactly as in other buffers: Emacs remembers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 16 previous locations of the mark. To return to a marked date, type @kbd{C-u
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 C-SPC} (or @kbd{C-u C-@@}); this is the command @code{calendar-set-mark} given
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 a numeric argument. It moves point to where the mark was, restores the mark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 from the ring of former marks, and stores the previous point at the end of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 the mark ring. So, repeated use of this command moves point through all
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 the old marks on the ring, one by one.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 @node General Calendar, LaTeX Calendar, Mark and Region, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 @subsection Miscellaneous Calendar Commands
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 @item p d
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 Display day-in-year (@code{calendar-print-day-of-year}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 @item ?
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 Briefly describe calendar commands (@code{describe-calendar-mode}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 @item C-c C-l
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 Regenerate the calendar window (@code{redraw-calendar}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 @item SPC
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 Scroll the next window (@code{scroll-other-window}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 @item q
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 Exit from calendar (@code{exit-calendar}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 @kindex p d @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 @cindex day of year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 @findex calendar-print-day-of-year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 If you want to know how many days have elapsed since the start of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 the year, or the number of days remaining in the year, type the @kbd{p d}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 command (@code{calendar-print-day-of-year}). This displays both
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 of those numbers in the echo area.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 @kindex ? @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 @findex describe-calendar-mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 To display a brief description of the calendar commands, type @kbd{?}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 (@code{describe-calendar-mode}). For a fuller description, type @kbd{C-h m}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 @kindex SPC @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 @findex scroll-other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 You can use @kbd{SPC} (@code{scroll-other-window}) to scroll the other
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 window. This is handy when you display a list of holidays or diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 in another window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 @kindex C-c C-l @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 @findex redraw-calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 If the calendar window text gets corrupted, type @kbd{C-c C-l}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 (@code{redraw-calendar}) to redraw it. (This can only happen if you use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 non-Calendar-mode editing commands.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 @kindex SPC @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 In Calendar mode, you can use @kbd{SPC} (@code{scroll-other-window})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 to scroll the other window. This is handy when you display a list of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 holidays or diary entries in another window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 @kindex q @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 @findex exit-calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 To exit from the calendar, type @kbd{q} (@code{exit-calendar}). This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 buries all buffers related to the calendar, selecting other buffers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352 (If a frame contains a dedicated calendar window, exiting from the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 calendar iconifies that frame.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 @node LaTeX Calendar, Holidays, General Calendar, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 @section LaTeX Calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357 @cindex calendar and La@TeX{}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 The Calendar La@TeX{} commands produce a buffer of La@TeX{} code that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 prints as a calendar. Depending on the command you use, the printed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361 calendar covers the day, week, month or year that point is in.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 @kindex t @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 @item t m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 Generate a one-month calendar (@code{cal-tex-cursor-month}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 @item t M
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 Generate a sideways-printing one-month calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 (@code{cal-tex-cursor-month-landscape}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370 @item t d
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 Generate a one-day calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 (@code{cal-tex-cursor-day}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 @item t w 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 Generate a one-page calendar for one week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 (@code{cal-tex-cursor-week}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 @item t w 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377 Generate a two-page calendar for one week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 (@code{cal-tex-cursor-week2}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 @item t w 3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 Generate an ISO-style calendar for one week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 (@code{cal-tex-cursor-week-iso}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 @item t w 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383 Generate a calendar for one Monday-starting week
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 (@code{cal-tex-cursor-week-monday}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 @item t f w
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 Generate a Filofax-style two-weeks-at-a-glance calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 (@code{cal-tex-cursor-filofax-2week}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 @item t f W
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389 Generate a Filofax-style one-week-at-a-glance calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 (@code{cal-tex-cursor-filofax-week}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391 @item t y
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 Generate a calendar for one year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 (@code{cal-tex-cursor-year}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 @item t Y
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395 Generate a sideways-printing calendar for one year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
396 (@code{cal-tex-cursor-year-landscape}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397 @item t f y
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398 Generate a Filofax-style calendar for one year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399 (@code{cal-tex-cursor-filofax-year}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 Some of these commands print the calendar sideways (in ``landscape
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403 mode''), so it can be wider than it is long. Some of them use Filofax
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 paper size (3.75in x 6.75in). All of these commands accept a prefix
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 argument which specifies how many days, weeks, months or years to print
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 (starting always with the selected one).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408 If the variable @code{cal-tex-holidays} is non-@code{nil} (the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 default), then the printed calendars show the holidays in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 @code{calendar-holidays}. If the variable @code{cal-tex-diary} is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 non-@code{nil} (the default is @code{nil}), diary entries are included
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 also (in weekly and monthly calendars only).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414 @node Holidays, Sunrise/Sunset, LaTeX Calendar, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 @subsection Holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 @cindex holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418 The Emacs calendar knows about all major and many minor holidays,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 and can display them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
422 @item h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 Display holidays for the selected date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424 (@code{calendar-cursor-holidays}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425 @item Button2 Holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426 Display any holidays for the date you click on.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 @item x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428 Mark holidays in the calendar window (@code{mark-calendar-holidays}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429 @item u
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430 Unmark calendar window (@code{calendar-unmark}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 @item a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432 List all holidays for the displayed three months in another window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 (@code{list-calendar-holidays}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434 @item M-x holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435 List all holidays for three months around today's date in another
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437 @item M-x list-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 List holidays in another window for a specified range of years.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441 @kindex h @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 @findex calendar-cursor-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
443 To see if any holidays fall on a given date, position point on that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444 date in the calendar window and use the @kbd{h} command. Alternatively,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445 click on that date with @kbd{Button2} and then choose @kbd{Holidays}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
446 from the menu that appears. Either way, this displays the holidays for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
447 that date, in the echo area if they fit there, otherwise in a separate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448 window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450 @kindex x @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
451 @findex mark-calendar-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
452 @kindex u @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 @findex calendar-unmark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
454 To view the distribution of holidays for all the dates shown in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
455 calendar, use the @kbd{x} command. This displays the dates that are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
456 holidays in a different face (or places a @samp{*} after these dates, if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
457 display with multiple faces is not available). The command applies both
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458 to the currently visible months and to other months that subsequently
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 become visible by scrolling. To turn marking off and erase the current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460 marks, type @kbd{u}, which also erases any diary marks (@pxref{Diary}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 @kindex a @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463 @findex list-calendar-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 To get even more detailed information, use the @kbd{a} command, which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465 displays a separate buffer containing a list of all holidays in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
466 current three-month range. You can use @key{SPC} in the calendar window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467 to scroll that list.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 @findex holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 The command @kbd{M-x holidays} displays the list of holidays for the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 current month and the preceding and succeeding months; this works even
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472 if you don't have a calendar window. If you want the list of holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 centered around a different month, use @kbd{C-u M-x holidays}, which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474 prompts for the month and year.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
476 The holidays known to Emacs include United States holidays and the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
477 major Christian, Jewish, and Islamic holidays; also the solstices and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478 equinoxes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
479
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480 @findex list-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 The command @kbd{M-x list-holidays} displays the list of holidays for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482 a range of years. This function asks you for the starting and stopping
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483 years, and allows you to choose all the holidays or one of several
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 categories of holidays. You can use this command even if you don't have
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485 a calendar window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
487 The dates used by Emacs for holidays are based on @emph{current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
488 practice}, not historical fact. Historically, for instance, the start
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 of daylight savings time and even its existence have varied from year to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490 year, but present United States law mandates that daylight savings time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 begins on the first Sunday in April. When the daylight savings rules
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492 are set up for the United States, Emacs always uses the present
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 definition, even though it is wrong for some prior years.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 @node Sunrise/Sunset, Lunar Phases, Holidays, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 @subsection Times of Sunrise and Sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 @cindex sunrise and sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 Special calendar commands can tell you, to within a minute or two, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500 times of sunrise and sunset for any date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 @item S
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504 Display times of sunrise and sunset for the selected date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505 (@code{calendar-sunrise-sunset}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
506 @item Button2 Sunrise/Sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507 Display times of sunrise and sunset for the date you click on.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 @item M-x sunrise-sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509 Display times of sunrise and sunset for today's date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510 @item C-u M-x sunrise-sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511 Display times of sunrise and sunset for a specified date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
514 @kindex S @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515 @findex calendar-sunrise-sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516 @findex sunrise-sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517 Within the calendar, to display the @emph{local times} of sunrise and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 sunset in the echo area, move point to the date you want, and type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519 @kbd{S}. Alternatively, click @kbd{Button2} on the date, then choose
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
520 @kbd{Sunrise/Sunset} from the menu that appears. The command @kbd{M-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
521 sunrise-sunset} is available outside the calendar to display this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 information for today's date or a specified date. To specify a date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
523 other than today, use @kbd{C-u M-x sunrise-sunset}, which prompts for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524 the year, month, and day.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 You can display the times of sunrise and sunset for any location and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 any date with @kbd{C-u C-u M-x sunrise-sunset}. This asks you for a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528 longitude, latitude, number of minutes difference from Coordinated
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 Universal Time, and date, and then tells you the times of sunrise and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 sunset for that location on that date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 Because the times of sunrise and sunset depend on the location on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 earth, you need to tell Emacs your latitude, longitude, and location
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 name before using these commands. Here is an example of what to set:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 @vindex calendar-location-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 @vindex calendar-longitude
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 @vindex calendar-latitude
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540 (setq calendar-latitude 40.1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541 (setq calendar-longitude -88.2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
542 (setq calendar-location-name "Urbana, IL")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
543 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
544
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
545 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
546 Use one decimal place in the values of @code{calendar-latitude} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
547 @code{calendar-longitude}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
548
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
549 Your time zone also affects the local time of sunrise and sunset.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
550 Emacs usually gets time zone information from the operating system, but
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
551 if these values are not what you want (or if the operating system does
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
552 not supply them), you must set them yourself. Here is an example:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
553
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
554 @vindex calendar-time-zone
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
555 @vindex calendar-standard-time-zone-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
556 @vindex calendar-daylight-time-zone-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
557 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
558 (setq calendar-time-zone -360)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
559 (setq calendar-standard-time-zone-name "CST")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
560 (setq calendar-daylight-time-zone-name "CDT")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
561 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
562
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
563 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
564 The value of @code{calendar-time-zone} is the number of minutes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
565 difference between your local standard time and Coordinated Universal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
566 Time (Greenwich time). The values of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
567 @code{calendar-standard-time-zone-name} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
568 @code{calendar-daylight-time-zone-name} are the abbreviations used in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
569 your time zone. Emacs displays the times of sunrise and sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
570 @emph{corrected for daylight savings time}. @xref{Daylight Savings},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
571 for how daylight savings time is determined.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
572
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
573 As a user, you might find it convenient to set the calendar location
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
574 variables for your usual physical location in your init file. And when
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
575 you install Emacs on a machine, you can create a @file{default.el} file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
576 which sets them properly for the typical location of most users of that
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
577 machine. @xref{Init File}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
578
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
579 @node Lunar Phases, Other Calendars, Sunrise/Sunset, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
580 @subsection Phases of the Moon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
581 @cindex phases of the moon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
582 @cindex moon, phases of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
583
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
584 These calendar commands display the dates and times of the phases of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
585 the moon (new moon, first quarter, full moon, last quarter). This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
586 feature is useful for debugging problems that ``depend on the phase of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
587 the moon.''
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
588
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
589 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
590 @item M
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
591 Display the dates and times for all the quarters of the moon for the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
592 three-month period shown (@code{calendar-phases-of-moon}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
593 @item M-x phases-of-moon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
594 Display dates and times of the quarters of the moon for three months around
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
595 today's date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
596 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
597
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
598 @kindex M @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
599 @findex calendar-phases-of-moon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
600 Within the calendar, use the @kbd{M} command to display a separate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
601 buffer of the phases of the moon for the current three-month range. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
602 dates and times listed are accurate to within a few minutes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
603
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
604 @findex phases-of-moon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
605 Outside the calendar, use the command @kbd{M-x phases-of-moon} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
606 display the list of the phases of the moon for the current month and the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
607 preceding and succeeding months. For information about a different
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
608 month, use @kbd{C-u M-x phases-of-moon}, which prompts for the month and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
609 year.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
610
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
611 The dates and times given for the phases of the moon are given in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
612 local time (corrected for daylight savings, when appropriate); but if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
613 the variable @code{calendar-time-zone} is void, Coordinated Universal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
614 Time (the Greenwich time zone) is used. @xref{Daylight Savings}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
615
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
616 @node Other Calendars, Calendar Systems, Lunar Phases, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
617 @subsection Conversion To and From Other Calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
618
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
619 @cindex Gregorian calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
620 The Emacs calendar displayed is @emph{always} the Gregorian calendar,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
621 sometimes called the ``new style'' calendar, which is used in most of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
622 the world today. However, this calendar did not exist before the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
623 sixteenth century and was not widely used before the eighteenth century;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
624 it did not fully displace the Julian calendar and gain universal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
625 acceptance until the early twentieth century. The Emacs calendar can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
626 display any month since January, year 1 of the current era, but the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
627 calendar displayed is the Gregorian, even for a date at which the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
628 Gregorian calendar did not exist.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
629
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
630 While Emacs cannot display other calendars, it can convert dates to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
631 and from several other calendars.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
632
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
633 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
634 * Calendar Systems:: The calendars Emacs understands
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
635 (aside from Gregorian).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
636 * To Other Calendar:: Converting the selected date to various calendars.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
637 * From Other Calendar:: Moving to a date specified in another calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
638 * Mayan Calendar:: Moving to a date specified in a Mayan calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
639 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
640
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
641 If you are interested in these calendars, you can convert dates one at a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
642 time. Put point on the desired date of the Gregorian calendar and press the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
643 appropriate keys. The @kbd{p} is a mnemonic for ``print'' since Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
644 ``prints' the equivalent date in the echo area.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
645 @node Calendar Systems, To Other Calendar, Other Calendars, Other Calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
646 @section Supported Calendar Systems
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
647
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
648 @cindex ISO commercial calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
649 The ISO commercial calendar is used largely in Europe.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
650
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
651 @cindex Julian calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
652 The Julian calendar, named after Julius Caesar, was the one used in Europe
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
653 throughout medieval times, and in many countries up until the nineteenth
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
654 century.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
655
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
656 @cindex Julian day numbers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
657 @cindex astronomical day numbers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
658 Astronomers use a simple counting of days elapsed since noon, Monday,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
659 January 1, 4713 B.C. on the Julian calendar. The number of days elapsed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
660 is called the @emph{Julian day number} or the @emph{Astronomical day number}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
661
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
662 @cindex Hebrew calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
663 The Hebrew calendar is used by tradition in the Jewish religion. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
664 Emacs calendar program uses the Hebrew calendar to determine the dates
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
665 of Jewish holidays. Hebrew calendar dates begin and end at sunset.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
666
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
667 @cindex Islamic calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
668 The Islamic calendar is used in many predominantly Islamic countries.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
669 Emacs uses it to determine the dates of Islamic holidays. There is no
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
670 universal agreement in the Islamic world about the calendar; Emacs uses
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
671 a widely accepted version, but the precise dates of Islamic holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
672 often depend on proclamation by religious authorities, not on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
673 calculations. As a consequence, the actual dates of observance can vary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
674 slightly from the dates computed by Emacs. Islamic calendar dates begin
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
675 and end at sunset.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
676
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
677 @cindex French Revolutionary calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
678 The French Revolutionary calendar was created by the Jacobins after the 1789
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
679 revolution, to represent a more secular and nature-based view of the annual
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
680 cycle, and to install a 10-day week in a rationalization measure similar to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
681 the metric system. The French government officially abandoned this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
682 calendar at the end of 1805.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
683
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
684 @cindex Mayan calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
685 The Maya of Central America used three separate, overlapping calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
686 systems, the @emph{long count}, the @emph{tzolkin}, and the @emph{haab}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
687 Emacs knows about all three of these calendars. Experts dispute the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
688 exact correlation between the Mayan calendar and our calendar; Emacs uses the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
689 Goodman-Martinez-Thompson correlation in its calculations.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
690
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
691 @cindex Coptic calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
692 @cindex Ethiopic calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
693 The Copts use a calendar based on the ancient Egyptian solar calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
694 Their calendar consists of twelve 30-day months followed by an extra
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
695 five-day period. Once every fourth year they add a leap day to this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
696 extra period to make it six days. The Ethiopic calendar is identical in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
697 structure, but has different year numbers and month names.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
698
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
699 @cindex Persian calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
700 The Persians use a solar calendar based on a design of Omar Khayyam.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
701 Their calendar consists of twelve months of which the first six have 31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
702 days, the next five have 30 days, and the last has 29 in ordinary years
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
703 and 30 in leap years. Leap years occur in a complicated pattern every
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
704 four or five years.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
705
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
706 @cindex Chinese calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
707 The Chinese calendar is a complicated system of lunar months arranged
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
708 into solar years. The years go in cycles of sixty, each year containing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
709 either twelve months in an ordinary year or thirteen months in a leap
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
710 year; each month has either 29 or 30 days. Years, ordinary months, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
711 days are named by combining one of ten ``celestial stems'' with one of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
712 twelve ``terrestrial branches'' for a total of sixty names that are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
713 repeated in a cycle of sixty.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
714
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
715 @node To Other Calendar, From Other Calendar, Calendar Systems, Other Calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
716 @section Converting To Other Calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
717
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
718 The following commands describe the selected date (the date at point)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
719 in various other calendar systems:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
720
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
721 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
722 @item Button2 Other Calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
723 Display the date that you click on, expressed in various other calendars.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
724 @kindex p @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
725 @findex calendar-print-iso-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
726 @item p c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
727 Display ISO commercial calendar equivalent for selected day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
728 (@code{calendar-print-iso-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
729 @findex calendar-print-julian-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
730 @item p j
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
731 Display Julian date for selected day (@code{calendar-print-julian-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
732 @findex calendar-print-astro-day-number
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
733 @item p a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
734 Display astronomical (Julian) day number for selected day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
735 (@code{calendar-print-astro-day-number}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
736 @findex calendar-print-hebrew-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
737 @item p h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
738 Display Hebrew date for selected day (@code{calendar-print-hebrew-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
739 @findex calendar-print-islamic-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
740 @item p i
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
741 Display Islamic date for selected day (@code{calendar-print-islamic-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
742 @findex calendar-print-french-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
743 @item p f
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
744 Display French Revolutionary date for selected day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
745 (@code{calendar-print-french-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
746 @findex calendar-print-chinese-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
747 @item p C
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
748 Display Chinese date for selected day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
749 (@code{calendar-print-chinese-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
750 @findex calendar-print-coptic-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
751 @item p k
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
752 Display Coptic date for selected day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
753 (@code{calendar-print-coptic-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
754 @findex calendar-print-ethiopic-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
755 @item p e
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
756 Display Ethiopic date for selected day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
757 (@code{calendar-print-ethiopic-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
758 @findex calendar-print-persian-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
759 @item p p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
760 Display Persian date for selected day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
761 (@code{calendar-print-persian-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
762 @findex calendar-print-mayan-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
763 @item p m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
764 Display Mayan date for selected day (@code{calendar-print-mayan-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
765 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
766
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
767 If you are using X, the easiest way to translate a date into other
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
768 calendars is to click on it with @kbd{Button2}, then choose @kbd{Other
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
769 Calendars} from the menu that appears. This displays the equivalent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
770 forms of the date in all the calendars Emacs understands, in the form of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
771 a menu. (Choosing an alternative from this menu doesn't actually do
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
772 anything---the menu is used only for display.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
773
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
774 Put point on the desired date of the Gregorian calendar, then type the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
775 appropriate keys. The @kbd{p} is a mnemonic for ``print'' since Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
776 ``prints'' the equivalent date in the echo area.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
777
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
778 @node From Other Calendar, Mayan Calendar, To Other Calendar, Other Calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
779 @section Converting From Other Calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
780
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
781 You can use the other supported calendars to specify a date to move
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
782 to. This section describes the commands for doing this using calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
783 other than Mayan; for the Mayan calendar, see the following section.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
784
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
785 @kindex g @var{char} @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
786 @findex calendar-goto-iso-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
787 @findex calendar-goto-julian-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
788 @findex calendar-goto-astro-day-number
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
789 @findex calendar-goto-hebrew-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
790 @findex calendar-goto-islamic-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
791 @findex calendar-goto-french-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
792 @findex calendar-goto-chinese-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
793 @findex calendar-goto-persian-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
794 @findex calendar-goto-coptic-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
795 @findex calendar-goto-ethiopic-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
796 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
797 @item g c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
798 Move to a date specified in the ISO commercial calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
799 (@code{calendar-goto-iso-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
800 @item g j
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
801 Move to a date specified in the Julian calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
802 (@code{calendar-goto-julian-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
803 @item g a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
804 Move to a date specified in astronomical (Julian) day number
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
805 (@code{calendar-goto-astro-day-number}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
806 @item g h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
807 Move to a date specified in the Hebrew calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
808 (@code{calendar-goto-hebrew-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
809 @item g i
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
810 Move to a date specified in the Islamic calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
811 (@code{calendar-goto-islamic-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
812 @item g f
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
813 Move to a date specified in the French Revolutionary calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
814 (@code{calendar-goto-french-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
815 @item g C
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
816 Move to a date specified in the Chinese calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
817 (@code{calendar-goto-chinese-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
818 @item g p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
819 Move to a date specified in the Persian calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
820 (@code{calendar-goto-persian-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
821 @item g k
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
822 Move to a date specified in the Coptic calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
823 (@code{calendar-goto-coptic-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
824 @item g e
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
825 Move to a date specified in the Ethiopic calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
826 (@code{calendar-goto-ethiopic-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
827 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
828
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
829 These commands ask you for a date on the other calendar, move point to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
830 the Gregorian calendar date equivalent to that date, and display the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
831 other calendar's date in the echo area. Emacs uses strict completion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
832 (@pxref{Completion}) whenever it asks you to type a month name, so you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
833 don't have to worry about the spelling of Hebrew, Islamic, or French names.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
834
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
835 @findex list-yahrzeit-dates
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
836 @cindex yahrzeits
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
837 One common question concerning the Hebrew calendar is the computation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
838 of the anniversary of a date of death, called a ``yahrzeit.'' The Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
839 calendar includes a facility for such calculations. If you are in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
840 calendar, the command @kbd{M-x list-yahrzeit-dates} asks you for a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
841 range of years and then displays a list of the yahrzeit dates for those
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
842 years for the date given by point. If you are not in the calendar,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
843 this command first asks you for the date of death and the range of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
844 years, and then displays the list of yahrzeit dates.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
845
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
846 @node Mayan Calendar, Diary ,From Other Calendar ,Other Calendars
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
847 @subsection Converting from the Mayan Calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
848
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
849 Here are the commands to select dates based on the Mayan calendar:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
850
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
851 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
852 @item g m l
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
853 Move to a date specified by the long count calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
854 (@code{calendar-goto-mayan-long-count-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
855 @item g m n t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
856 Move to the next occurrence of a place in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
857 tzolkin calendar (@code{calendar-next-tzolkin-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
858 @item g m p t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
859 Move to the previous occurrence of a place in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
860 tzolkin calendar (@code{calendar-previous-tzolkin-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
861 @item g m n h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
862 Move to the next occurrence of a place in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
863 haab calendar (@code{calendar-next-haab-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
864 @item g m p h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
865 Move to the previous occurrence of a place in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
866 haab calendar (@code{calendar-previous-haab-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
867 @item g m n c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
868 Move to the next occurrence of a place in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
869 calendar round (@code{calendar-next-calendar-round-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
870 @item g m p c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
871 Move to the previous occurrence of a place in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
872 calendar round (@code{calendar-previous-calendar-round-date}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
873 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
874
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
875 @cindex Mayan long count
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
876 To understand these commands, you need to understand the Mayan calendars.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
877 The @dfn{long count} is a counting of days with these units:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
878
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
879 @display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
880 1 kin = 1 day@ @ @ 1 uinal = 20 kin@ @ @ 1 tun = 18 uinal
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
881 1 katun = 20 tun@ @ @ 1 baktun = 20 katun
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
882 @end display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
883
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
884 @kindex g m l @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
885 @findex calendar-goto-mayan-long-count-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
886 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
887 Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
888 tun, 16 uinal, and 6 kin. The Emacs calendar can handle Mayan long
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
889 count dates as early as 7.17.18.13.1, but no earlier. When you use the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
890 @kbd{g m l} command, type the Mayan long count date with the baktun,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
891 katun, tun, uinal, and kin separated by periods.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
892
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
893 @findex calendar-previous-tzolkin-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
894 @findex calendar-next-tzolkin-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
895 @cindex Mayan tzolkin calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
896 The Mayan tzolkin calendar is a cycle of 260 days formed by a pair of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
897 independent cycles of 13 and 20 days. Since this cycle repeats
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
898 endlessly, Emacs provides commands to move backward and forward to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
899 previous or next point in the cycle. Type @kbd{g m p t} to go to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
900 previous tzolkin date; Emacs asks you for a tzolkin date and moves point
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
901 to the previous occurrence of that date. Similarly, type @kbd{g m n t}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
902 to go to the next occurrence of a tzolkin date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
903
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
904 @findex calendar-previous-haab-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
905 @findex calendar-next-haab-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
906 @cindex Mayan haab calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
907 The Mayan haab calendar is a cycle of 365 days arranged as 18 months
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
908 of 20 days each, followed a 5-day monthless period. Like the tzolkin
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
909 cycle, this cycle repeats endlessly, and there are commands to move
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
910 backward and forward to the previous or next point in the cycle. Type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
911 @kbd{g m p h} to go to the previous haab date; Emacs asks you for a haab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
912 date and moves point to the previous occurrence of that date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
913 Similarly, type @kbd{g m n h} to go to the next occurrence of a haab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
914 date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
915
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
916 @c This is omitted because it is too long for smallbook format.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
917 @c @findex calendar-previous-calendar-round-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
918 @findex calendar-next-calendar-round-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
919 @cindex Mayan calendar round
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
920 The Maya also used the combination of the tzolkin date and the haab
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
921 date. This combination is a cycle of about 52 years called a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
922 @emph{calendar round}. If you type @kbd{g m p c}, Emacs asks you for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
923 both a haab and a tzolkin date and then moves point to the previous
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
924 occurrence of that combination. Use @kbd{g m n c} to move point to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
925 next occurrence of a combination. These commands signal an error if the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
926 haab/tzolkin date combination you have typed is impossible.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
927
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
928 Emacs uses strict completion (@pxref{Completion}) whenever it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
929 asks you to type a Mayan name, so you don't have to worry about
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
930 spelling.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
931
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
932 @node Diary, Calendar Customization, Mayan Calendar, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
933 @subsection The Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
934 @cindex diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
935
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
936 The Emacs diary keeps track of appointments or other events on a daily
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
937 basis, in conjunction with the calendar. To use the diary feature, you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
938 must first create a @dfn{diary file} containing a list of events and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
939 their dates. Then Emacs can automatically pick out and display the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
940 events for today, for the immediate future, or for any specified
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
941 date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
942
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
943 By default, Emacs uses @file{~/diary} as the diary file. This is the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
944 same file that the @code{calendar} utility uses. A sample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
945 @file{~/diary} file is:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
946
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
947 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
948 12/22/1988 Twentieth wedding anniversary!!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
949 &1/1. Happy New Year!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
950 10/22 Ruth's birthday.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
951 * 21, *: Payday
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
952 Tuesday--weekly meeting with grad students at 10am
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
953 Supowit, Shen, Bitner, and Kapoor to attend.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
954 1/13/89 Friday the thirteenth!!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
955 &thu 4pm squash game with Lloyd.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
956 mar 16 Dad's birthday
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
957 April 15, 1989 Income tax due.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
958 &* 15 time cards due.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
959 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
960
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
961 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
962 This example uses extra spaces to align the event descriptions of most
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
963 of the entries. Such formatting is purely a matter of taste.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
964
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
965 Although you probably will start by creating a diary manually, Emacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
966 provides a number of commands to let you view, add, and change diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
967 entries. You can also share diary entries with other users
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
968 (@pxref{Included Diary Files}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
969
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
970 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
971 * Diary Commands:: Viewing diary entries and associated calendar dates.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
972 * Format of Diary File:: Entering events in your diary.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
973 * Date Formats:: Various ways you can specify dates.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
974 * Adding to Diary:: Commands to create diary entries.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
975 * Special Diary Entries:: Anniversaries, blocks of dates, cyclic entries, etc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
976 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
977
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
978 @node Diary Commands, Format of Diary File, Diary, Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
979 @subsection Commands Displaying Diary Entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
980
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
981 Once you have created a @file{~/diary} file, you can use the calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
982 to view it. You can also view today's events outside of Calendar mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
983
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
984 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
985 @item d
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
986 Display all diary entries for the selected date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
987 (@code{view-diary-entries}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
988 @item Button2 Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
989 Display all diary entries for the date you click on.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
990 @item s
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
991 Display the entire diary file (@code{show-all-diary-entries}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
992 @item m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
993 Mark all visible dates that have diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
994 (@code{mark-diary-entries}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
995 @item u
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
996 Unmark the calendar window (@code{calendar-unmark}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
997 @item M-x print-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
998 Print hard copy of the diary display as it appears.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
999 @item M-x diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1000 Display all diary entries for today's date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1001 @item M-x diary-mail-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1002 Mail yourself email reminders about upcoming diary entries.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1003 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1004
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1005 @kindex d @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1006 @findex view-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1007 Displaying the diary entries with @kbd{d} shows in a separate window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1008 the diary entries for the selected date in the calendar. The mode line
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1009 of the new window shows the date of the diary entries and any holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1010 that fall on that date. If you specify a numeric argument with @kbd{d},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1011 it shows all the diary entries for that many successive days. Thus,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1012 @kbd{2 d} displays all the entries for the selected date and for the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1013 following day.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1014
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1015 Another way to display the diary entries for a date is to click
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1016 @kbd{Button2} on the date, and then choose @kbd{Diary} from the menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1017 that appears.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1018
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1019 @kindex m @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1020 @findex mark-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1021 @kindex u @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1022 @findex calendar-unmark
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1023 To get a broader view of which days are mentioned in the diary, use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1024 the @kbd{m} command. This displays the dates that have diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1025 in a different face (or places a @samp{+} after these dates, if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1026 display with multiple faces is not available). The command applies both
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1027 to the currently visible months and to other months that subsequently
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1028 become visible by scrolling. To turn marking off and erase the current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1029 marks, type @kbd{u}, which also turns off holiday marks
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1030 (@pxref{Holidays}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1031
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1032 @kindex s @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1033 @findex show-all-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1034 To see the full diary file, rather than just some of the entries, use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1035 the @kbd{s} command.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1036
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1037 Display of selected diary entries uses the selective display feature
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1038 to hide entries that don't apply.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1039
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1040 @findex print-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1041 The diary buffer as you see it is an illusion, so simply printing the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1042 buffer does not print what you see on your screen. There is a special
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1043 command to print hard copy of the diary buffer @emph{as it appears};
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1044 this command is @kbd{M-x print-diary-entries}. It sends the data
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1045 directly to the printer. You can customize it like @code{lpr-region}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1046 (@pxref{Hardcopy}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1047
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1048 @findex diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1049 The command @kbd{M-x diary} displays the diary entries for the current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1050 date, independently of the calendar display, and optionally for the next
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1051 few days as well; the variable @code{number-of-diary-entries} specifies
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1052 how many days to include (@pxref{Customization}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1053
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1054 If you put @code{(diary)} in your init file, this
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1055 automatically displays a window with the day's diary entries, when you
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1056 enter Emacs. @xref{Init File}. The mode line of the displayed window
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1057 shows the date and any holidays that fall on that date.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1058
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1059 @findex diary-mail-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1060 @vindex diary-mail-days
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1061 Many users like to receive notice of events in their diary as email.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1062 To send such mail to yourself, use the command @kbd{M-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1063 diary-mail-entries}. A prefix argument specifies how many days
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1064 (starting with today) to check; otherwise, the variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1065 @code{diary-mail-days} says how many days.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1066
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1067 @node Format of Diary File, Date Formats, Diary Commands, Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1068 @subsection The Diary File
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1069 @cindex diary file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1070
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1071 @vindex diary-file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1072 Your @dfn{diary file} is a file that records events associated with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1073 particular dates. The name of the diary file is specified by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1074 variable @code{diary-file}; @file{~/diary} is the default. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1075 @code{calendar} utility program supports a subset of the format allowed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1076 by the Emacs diary facilities, so you can use that utility to view the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1077 diary file, with reasonable results aside from the entries it cannot
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1078 understand.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1079
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1080 Each entry in the diary file describes one event and consists of one
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1081 or more lines. An entry always begins with a date specification at the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1082 left margin. The rest of the entry is simply text to describe the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1083 event. If the entry has more than one line, then the lines after the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1084 first must begin with whitespace to indicate they continue a previous
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1085 entry. Lines that do not begin with valid dates and do not continue a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1086 preceding entry are ignored.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1087
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1088 You can inhibit the marking of certain diary entries in the calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1089 window; to do this, insert an ampersand (@samp{&}) at the beginning of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1090 the entry, before the date. This has no effect on display of the entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1091 in the diary window; it affects only marks on dates in the calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1092 window. Nonmarking entries are especially useful for generic entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1093 that would otherwise mark many different dates.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1094
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1095 If the first line of a diary entry consists only of the date or day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1096 name with no following blanks or punctuation, then the diary window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1097 display doesn't include that line; only the continuation lines appear.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1098 For example, this entry:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1099
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1100 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1101 02/11/1989
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1102 Bill B. visits Princeton today
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1103 2pm Cognitive Studies Committee meeting
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1104 2:30-5:30 Liz at Lawrenceville
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1105 4:00pm Dentist appt
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1106 7:30pm Dinner at George's
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1107 8:00-10:00pm concert
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1108 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1109
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1110 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1111 appears in the diary window without the date line at the beginning.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1112 This style of entry looks neater when you display just a single day's
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1113 entries, but can cause confusion if you ask for more than one day's
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1114 entries.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1116 You can edit the diary entries as they appear in the window, but it is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1117 important to remember that the buffer displayed contains the @emph{entire}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1118 diary file, with portions of it concealed from view. This means, for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1119 instance, that the @kbd{C-f} (@code{forward-char}) command can put point
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1120 at what appears to be the end of the line, but what is in reality the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1121 middle of some concealed line.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1122
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1123 @emph{Be careful when editing the diary entries!} Inserting
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1124 additional lines or adding/deleting characters in the middle of a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1125 visible line cannot cause problems, but editing at the end of a line may
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1126 not do what you expect. Deleting a line may delete other invisible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1127 entries that follow it. Before editing the diary, it is best to display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1128 the entire file with @kbd{s} (@code{show-all-diary-entries}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1130 @node Date Formats,Adding to Diary ,Format of Diary File, Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1131 @subsection Date Formats
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1132
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1133 Here are some sample diary entries, illustrating different ways of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1134 formatting a date. The examples all show dates in American order
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1135 (month, day, year), but Calendar mode supports European order (day,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1136 month, year) as an option.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1137
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1138 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1139 4/20/93 Switch-over to new tabulation system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1140 apr. 25 Start tabulating annual results
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1141 4/30 Results for April are due
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1142 */25 Monthly cycle finishes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1143 Friday Don't leave without backing up files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1144 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1145
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1146 The first entry appears only once, on April 20, 1993. The second and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1147 third appear every year on the specified dates, and the fourth uses a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1148 wildcard (asterisk) for the month, so it appears on the 25th of every
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1149 month. The final entry appears every week on Friday.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1150
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1151 You can use just numbers to express a date, as in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1152 @samp{@var{month}/@var{day}} or @samp{@var{month}/@var{day}/@var{year}}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1153 This must be followed by a nondigit. In the date itself, @var{month}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1154 and @var{day} are numbers of one or two digits. The optional @var{year}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1155 is also a number, and may be abbreviated to the last two digits; that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1156 is, you can use @samp{11/12/1989} or @samp{11/12/89}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1158 Dates can also have the form @samp{@var{monthname} @var{day}} or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1159 @samp{@var{monthname} @var{day}, @var{year}}, where the month's name can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1160 be spelled in full or abbreviated to three characters (with or without a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1161 period). Case is not significant.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1162
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1163 A date may be @dfn{generic}; that is, partially unspecified. Then the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1164 entry applies to all dates that match the specification. If the date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1165 does not contain a year, it is generic and applies to any year.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1166 Alternatively, @var{month}, @var{day}, or @var{year} can be a @samp{*};
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1167 this matches any month, day, or year, respectively. Thus, a diary entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1168 @samp{3/*/*} matches any day in March of any year; so does @samp{march
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1169 *}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1170
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1171 @vindex european-calendar-style
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1172 @findex european-calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1173 @findex american-calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1174 If you prefer the European style of writing dates---in which the day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1175 comes before the month---type @kbd{M-x european-calendar} while in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1176 calendar, or set the variable @code{european-calendar-style} to @code{t}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1177 @emph{before} using any calendar or diary command. This mode interprets
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1178 all dates in the diary in the European manner, and also uses European
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1179 style for displaying diary dates. (Note that there is no comma after
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1180 the @var{monthname} in the European style.) To go back to the (default)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1181 American style of writing dates, type @kbd{M-x american-calendar}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1183 You can use the name of a day of the week as a generic date which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1184 applies to any date falling on that day of the week. You can abbreviate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1185 the day of the week to three letters (with or without a period) or spell
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1186 it in full; case is not significant.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1187
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1188 @node Adding to Diary, Special Diary Entries, Date Formats, Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1189 @subsection Commands to Add to the Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1190
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1191 While in the calendar, there are several commands to create diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1192 entries:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1193
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1194 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1195 @item i d
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1196 Add a diary entry for the selected date (@code{insert-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1197 @item i w
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1198 Add a diary entry for the selected day of the week (@code{insert-weekly-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1199 @item i m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1200 Add a diary entry for the selected day of the month (@code{insert-monthly-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1201 @item i y
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1202 Add a diary entry for the selected day of the year (@code{insert-yearly-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1203 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1204
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1205 @kindex i d @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1206 @findex insert-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1207 You can make a diary entry for a specific date by selecting that date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1208 in the calendar window and typing the @kbd{i d} command. This command
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1209 displays the end of your diary file in another window and inserts the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1210 date; you can then type the rest of the diary entry.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1211
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1212 @kindex i w @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1213 @findex insert-weekly-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1214 @kindex i m @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1215 @findex insert-monthly-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1216 @kindex i y @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1217 @findex insert-yearly-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1218 If you want to make a diary entry that applies to a specific day of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1219 the week, select that day of the week (any occurrence will do) and type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1220 @kbd{i w}. This inserts the day-of-week as a generic date; you can then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1221 type the rest of the diary entry. You can make a monthly diary entry in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1222 the same fashion. Select the day of the month, use the @kbd{i m}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1223 command, and type rest of the entry. Similarly, you can insert a yearly
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1224 diary entry with the @kbd{i y} command.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1225
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1226 All of the above commands make marking diary entries by default. To
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1227 make a nonmarking diary entry, give a numeric argument to the command.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1228 For example, @kbd{C-u i w} makes a nonmarking weekly diary entry.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1229
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1230 When you modify the diary file, be sure to save the file before
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1231 exiting Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1232
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1233 @node Special Diary Entries,, Adding to Diary, Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1234 @subsection Special Diary Entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1236 In addition to entries based on calendar dates, the diary file can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1237 contain @dfn{sexp entries} for regular events such as anniversaries.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1238 These entries are based on Lisp expressions (sexps) that Emacs evaluates
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1239 as it scans the diary file. Instead of a date, a sexp entry contains
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1240 @samp{%%} followed by a Lisp expression which must begin and end with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1241 parentheses. The Lisp expression determines which dates the entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1242 applies to.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1243
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1244 Calendar mode provides commands to insert certain commonly used
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1245 sexp entries:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1246
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1247 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1248 @item i a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1249 Add an anniversary diary entry for the selected date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1250 (@code{insert-anniversary-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1251 @item i b
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1252 Add a block diary entry for the current region
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1253 (@code{insert-block-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1254 @item i c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1255 Add a cyclic diary entry starting at the date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1256 (@code{insert-cyclic-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1257 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1258
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1259 @kindex i a @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1260 @findex insert-anniversary-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1261 If you want to make a diary entry that applies to the anniversary of a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1262 specific date, move point to that date and use the @kbd{i a} command.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1263 This displays the end of your diary file in another window and inserts
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1264 the anniversary description; you can then type the rest of the diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1265 entry. The entry looks like this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1266
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1267 @findex diary-anniversary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1268 The effect of @kbd{i a} is to add a @code{diary-anniversary} sexp to your
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1269 diary file. You can also add one manually, for instance:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1270
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1271 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1272 %%(diary-anniversary 10 31 1948) Arthur's birthday
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1273 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1274
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1275 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1276 This entry applies to October 31 in any year after 1948; @samp{10 31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1277 1948} specifies the date. (If you are using the European calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1278 style, the month and day are interchanged.) The reason this expression
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1279 requires a beginning year is that advanced diary functions can use it to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1280 calculate the number of elapsed years.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1281
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1282 A @dfn{block} diary entry applies to a specified range of consecutive
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1283 dates. Here is a block diary entry that applies to all dates from June
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1284 24, 1990 through July 10, 1990:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1285
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1286 @findex diary-block
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1287 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1288 %%(diary-block 6 24 1990 7 10 1990) Vacation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1289 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1290
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1291 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1292 The @samp{6 24 1990} indicates the starting date and the @samp{7 10 1990}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1293 indicates the stopping date. (Again, if you are using the European calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1294 style, the month and day are interchanged.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1295
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1296 @kindex i b @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1297 @findex insert-block-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1298 To insert a block entry, place point and the mark on the two
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1299 dates that begin and end the range, and type @kbd{i b}. This command
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1300 displays the end of your diary file in another window and inserts the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1301 block description; you can then type the diary entry.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1302
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1303 @kindex i c @r{(Calendar mode)}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1304 @findex insert-cyclic-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1305 @dfn{Cyclic} diary entries repeat after a fixed interval of days. To
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1306 create one, select the starting date and use the @kbd{i c} command. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1307 command prompts for the length of interval, then inserts the entry,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1308 which looks like this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1309
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1310 @findex diary-cyclic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1311 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1312 %%(diary-cyclic 50 3 1 1990) Renew medication
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1313 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1314
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1315 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1316 This entry applies to March 1, 1990 and every 50th day following;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1317 @samp{3 1 1990} specifies the starting date. (If you are using the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1318 European calendar style, the month and day are interchanged.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1319
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1320 All three of these commands make marking diary entries. To insert a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1321 nonmarking entry, give a numeric argument to the command. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1322 @kbd{C-u i a} makes a nonmarking anniversary diary entry.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1323
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1324 Marking sexp diary entries in the calendar is @emph{extremely}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1325 time-consuming, since every date visible in the calendar window must be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1326 individually checked. So it's a good idea to make sexp diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1327 nonmarking (with @samp{&}) when possible.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1328
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1329 Another sophisticated kind of sexp entry, a @dfn{floating} diary entry,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1330 specifies a regularly occurring event by offsets specified in days,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1331 weeks, and months. It is comparable to a crontab entry interpreted by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1332 the @code{cron} utility. Here is a nonmarking, floating diary entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1333 that applies to the last Thursday in November:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1334
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1335 @findex diary-float
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1336 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1337 &%%(diary-float 11 4 -1) American Thanksgiving
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1338 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1339
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1340 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1341 The 11 specifies November (the eleventh month), the 4 specifies Thursday
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1342 (the fourth day of the week, where Sunday is numbered zero), and the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1343 @minus{}1 specifies ``last'' (1 would mean ``first'', 2 would mean
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1344 ``second'', @minus{}2 would mean ``second-to-last'', and so on). The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1345 month can be a single month or a list of months. Thus you could change
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1346 the 11 above to @samp{'(1 2 3)} and have the entry apply to the last
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1347 Thursday of January, February, and March. If the month is @code{t}, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1348 entry applies to all months of the year.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1349
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1350 The sexp feature of the diary allows you to specify diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1351 based on any Emacs Lisp expression. You can use the library of built-in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1352 functions or you can write your own functions. The built-in functions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1353 include the ones shown in this section, plus a few others (@pxref{Sexp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1354 Diary Entries}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1355
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1356 The generality of sexps lets you specify any diary entry that you can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1357 describe algorithmically. Suppose you get paid on the 21st of the month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1358 if it is a weekday, and to the Friday before if the 21st is on a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1359 weekend. The diary entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1360
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1361 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1362 &%%(let ((dayname (calendar-day-of-week date))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1363 (day (car (cdr date))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1364 (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1365 (and (memq day '(19 20)) (= dayname 5)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1366 ) Pay check deposited
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1367 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1368
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1369 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1370 to just those dates. This example illustrates how the sexp can depend
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1371 on the variable @code{date}; this variable is a list (@var{month}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1372 @var{day} @var{year}) that gives the Gregorian date for which the diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1373 entries are being found. If the value of the sexp is @code{t}, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1374 entry applies to that date. If the sexp evaluates to @code{nil}, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1375 entry does @emph{not} apply to that date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1376
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1377
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1378 @node Calendar Customization,,Diary, Calendar/Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1379 @subsection Customizing the Calendar and Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1380
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1381 There are many customizations that you can use to make the calendar and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1382 diary suit your personal tastes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1383
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1384 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1385 * Calendar Customizing:: Defaults you can set.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1386 * Holiday Customizing:: Defining your own holidays.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1387 * Date Display Format:: Changing the format.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1388 * Time Display Format:: Changing the format.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1389 * Daylight Savings:: Changing the default.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1390 * Diary Customizing:: Defaults you can set.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1391 * Hebrew/Islamic Entries:: How to obtain them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1392 * Fancy Diary Display:: Enhancing the diary display, sorting entries.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1393 * Included Diary Files:: Sharing a common diary file.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1394 * Sexp Diary Entries:: Fancy things you can do.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1395 * Appt Customizing:: Customizing appointment reminders.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1396 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1397
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1398 @node Calendar Customizing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1399 @subsubsection Customizing the Calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1400 @vindex view-diary-entries-initially
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1401
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1402 If you set the variable @code{view-diary-entries-initially} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1403 @code{t}, calling up the calendar automatically displays the diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1404 entries for the current date as well. The diary dates appear only if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1405 the current date is visible. If you add both of the following lines to
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1406 your init file:@refill
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1407
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1408 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1409 (setq view-diary-entries-initially t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1410 (calendar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1411 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1412
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1413 @noindent
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1414 this displays both the calendar and diary windows whenever you start
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1415 Emacs. @xref{Init File}.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1416
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1417 @vindex view-calendar-holidays-initially
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1418 Similarly, if you set the variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1419 @code{view-calendar-holidays-initially} to @code{t}, entering the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1420 calendar automatically displays a list of holidays for the current
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1421 three-month period. The holiday list appears in a separate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1422 window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1423
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1424 @vindex mark-diary-entries-in-calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1425 You can set the variable @code{mark-diary-entries-in-calendar} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1426 @code{t} in order to mark any dates with diary entries. This takes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1427 effect whenever the calendar window contents are recomputed. There are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1428 two ways of marking these dates: by changing the face (@pxref{Faces}),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1429 if the display supports that, or by placing a plus sign (@samp{+})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1430 beside the date otherwise.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1431
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1432 @vindex mark-holidays-in-calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1433 Similarly, setting the variable @code{mark-holidays-in-calendar} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1434 @code{t} marks holiday dates, either with a change of face or with an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1435 asterisk (@samp{*}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1436
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1437 @vindex calendar-holiday-marker
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1438 @vindex diary-entry-marker
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1439 The variable @code{calendar-holiday-marker} specifies how to mark a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1440 date as being a holiday. Its value may be a character to insert next to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1441 the date, or a face name to use for displaying the date. Likewise, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1442 variable @code{diary-entry-marker} specifies how to mark a date that has
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1443 diary entries. The calendar creates faces named @code{holiday-face} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1444 @code{diary-face} for these purposes; those symbols are the default
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1445 values of these variables, when Emacs supports multiple faces on your
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1446 terminal.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1447
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1448 @vindex calendar-load-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1449 The variable @code{calendar-load-hook} is a normal hook run when the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1450 calendar package is first loaded (before actually starting to display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1451 the calendar).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1452
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1453 @vindex initial-calendar-window-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1454 Starting the calendar runs the normal hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1455 @code{initial-calendar-window-hook}. Recomputation of the calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1456 display does not run this hook. But if you leave the calendar with the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1457 @kbd{q} command and reenter it, the hook runs again.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1458
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1459 @vindex today-visible-calendar-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1460 The variable @code{today-visible-calendar-hook} is a normal hook run
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1461 after the calendar buffer has been prepared with the calendar when the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1462 current date is visible in the window. One use of this hook is to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1463 replace today's date with asterisks; to do that, use the hook function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1464 @code{calendar-star-date}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1465
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1466 @findex calendar-star-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1467 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1468 (add-hook 'today-visible-calendar-hook 'calendar-star-date)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1469 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1470
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1471 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1472 Another standard hook function marks the current date, either by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1473 changing its face or by adding an asterisk. Here's how to use it:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1474
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1475 @findex calendar-mark-today
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1476 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1477 (add-hook 'today-visible-calendar-hook 'calendar-mark-today)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1478 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1479
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1480 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1481 @vindex calendar-today-marker
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1482 The variable @code{calendar-today-marker} specifies how to mark today's
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1483 date. Its value should be a character to insert next to the date or a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1484 face name to use for displaying the date. A face named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1485 @code{calendar-today-face} is provided for this purpose; that symbol is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1486 the default for this variable when Emacs supports multiple faces on your
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1487 terminal.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1488
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1489 @vindex today-invisible-calendar-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1490 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1491 A similar normal hook, @code{today-invisible-calendar-hook} is run if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1492 the current date is @emph{not} visible in the window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1493
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1494 @node Holiday Customizing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1495 @subsubsection Customizing the Holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1496
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1497 @vindex calendar-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1498 @vindex christian-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1499 @vindex hebrew-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1500 @vindex islamic-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1501 Emacs knows about holidays defined by entries on one of several lists.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1502 You can customize these lists of holidays to your own needs, adding or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1503 deleting holidays. The lists of holidays that Emacs uses are for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1504 general holidays (@code{general-holidays}), local holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1505 (@code{local-holidays}), Christian holidays (@code{christian-holidays}),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1506 Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Moslem)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1507 holidays (@code{islamic-holidays}), and other holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1508 (@code{other-holidays}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1509
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1510 @vindex general-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1511 The general holidays are, by default, holidays common throughout the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1512 United States. To eliminate these holidays, set @code{general-holidays}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1513 to @code{nil}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1514
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1515 @vindex local-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1516 There are no default local holidays (but sites may supply some). You
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1517 can set the variable @code{local-holidays} to any list of holidays, as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1518 described below.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1519
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1520 @vindex all-christian-calendar-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1521 @vindex all-hebrew-calendar-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1522 @vindex all-islamic-calendar-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1523 By default, Emacs does not include all the holidays of the religions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1524 that it knows, only those commonly found in secular calendars. For a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1525 more extensive collection of religious holidays, you can set any (or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1526 all) of the variables @code{all-christian-calendar-holidays},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1527 @code{all-hebrew-calendar-holidays}, or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1528 @code{all-islamic-calendar-holidays} to @code{t}. If you want to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1529 eliminate the religious holidays, set any or all of the corresponding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1530 variables @code{christian-holidays}, @code{hebrew-holidays}, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1531 @code{islamic-holidays} to @code{nil}.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1532
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1533 @vindex other-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1534 You can set the variable @code{other-holidays} to any list of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1535 holidays. This list, normally empty, is intended for individual use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1536
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1537 @cindex holiday forms
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1538 Each of the lists (@code{general-holidays}, @code{local-holidays},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1539 @code{christian-holidays}, @code{hebrew-holidays},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1540 @code{islamic-holidays}, and @code{other-holidays}) is a list of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1541 @dfn{holiday forms}, each holiday form describing a holiday (or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1542 sometimes a list of holidays).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1543
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1544 Here is a table of the possible kinds of holiday form. Day numbers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1545 and month numbers count starting from 1, but ``dayname'' numbers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1546 count Sunday as 0. The element @var{string} is always the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1547 name of the holiday, as a string.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1548
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1549 @table @code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1550 @item (holiday-fixed @var{month} @var{day} @var{string})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1551 A fixed date on the Gregorian calendar. @var{month} and @var{day} are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1552 numbers, @var{string} is the name of the holiday.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1553
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1554 @item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1555 The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1556 (@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1557 from the end of the month. @var{string} is the name of the holiday.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1558
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1559 @item (holiday-hebrew @var{month} @var{day} @var{string})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1560 A fixed date on the Hebrew calendar. @var{month} and @var{day} are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1561 numbers, @var{string} is the name of the holiday.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1562
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1563 @item (holiday-islamic @var{month} @var{day} @var{string})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1564 A fixed date on the Islamic calendar. @var{month} and @var{day} are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1565 numbers, @var{string} is the name of the holiday.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1566
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1567 @item (holiday-julian @var{month} @var{day} @var{string})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1568 A fixed date on the Julian calendar. @var{month} and @var{day} are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1569 numbers, @var{string} is the name of the holiday.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1570
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1571 @item (holiday-sexp @var{sexp} @var{string})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1572 A date calculated by the Lisp expression @var{sexp}. The expression
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1573 should use the variable @code{year} to compute and return the date of a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1574 holiday, or @code{nil} if the holiday doesn't happen this year. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1575 value of @var{sexp} must represent the date as a list of the form
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1576 @code{(@var{month} @var{day} @var{year})}. @var{string} is the name of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1577 the holiday.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1578
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1579 @item (if @var{condition} @var{holiday-form} &optional @var{holiday-form})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1580 A holiday that happens only if @var{condition} is true.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1581
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1582 @item (@var{function} @r{[}@var{args}@r{]})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1583 A list of dates calculated by the function @var{function}, called with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1584 arguments @var{args}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1585 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1586
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1587 For example, suppose you want to add Bastille Day, celebrated in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1588 France on July 14. You can do this by adding the following line
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1589 to your init file:
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1590
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1591 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1592 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1593 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1594
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1595 @xref{Init File}.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
1596
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1597 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1598 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1599 fourteenth day of the seventh month (July).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1600
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1601 Many holidays occur on a specific day of the week, at a specific time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1602 of month. Here is a holiday form describing Hurricane Supplication Day,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1603 celebrated in the Virgin Islands on the fourth Monday in August:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1604
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1605 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1606 (holiday-float 8 1 4 "Hurricane Supplication Day")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1607 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1608
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1609 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1610 Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1611 Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1612 the month (1 specifies the first occurrence, 2 the second occurrence,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1613 @minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1614 so on).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1615
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1616 You can specify holidays that occur on fixed days of the Hebrew,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1617 Islamic, and Julian calendars too. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1618
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1619 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1620 (setq other-holidays
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1621 '((holiday-hebrew 10 2 "Last day of Hanukkah")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1622 (holiday-islamic 3 12 "Mohammed's Birthday")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1623 (holiday-julian 4 2 "Jefferson's Birthday")))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1624 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1625
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1626 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1627 adds the last day of Hanukkah (since the Hebrew months are numbered with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1628 1 starting from Nisan), the Islamic feast celebrating Mohammed's
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1629 birthday (since the Islamic months are numbered from 1 starting with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1630 Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1631 Julian calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1632
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1633 To include a holiday conditionally, use either Emacs Lisp's @code{if} or the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1634 @code{holiday-sexp} form. For example, American presidential elections
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1635 occur on the first Tuesday after the first Monday in November of years
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1636 divisible by 4:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1637
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1638 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1639 (holiday-sexp (if (= 0 (% year 4))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1640 (calendar-gregorian-from-absolute
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1641 (1+ (calendar-dayname-on-or-before
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1642 1 (+ 6 (calendar-absolute-from-gregorian
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1643 (list 11 1 year))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1644 "US Presidential Election"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1645 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1646
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1647 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1648 or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1649
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1650 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1651 (if (= 0 (% displayed-year 4))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1652 (fixed 11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1653 (extract-calendar-day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1654 (calendar-gregorian-from-absolute
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1655 (1+ (calendar-dayname-on-or-before
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1656 1 (+ 6 (calendar-absolute-from-gregorian
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1657 (list 11 1 displayed-year)))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1658 "US Presidential Election"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1659 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1660
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1661 Some holidays just don't fit into any of these forms because special
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1662 calculations are involved in their determination. In such cases you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1663 must write a Lisp function to do the calculation. To include eclipses,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1664 for example, add @code{(eclipses)} to @code{other-holidays}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1665 and write an Emacs Lisp function @code{eclipses} that returns a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1666 (possibly empty) list of the relevant Gregorian dates among the range
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1667 visible in the calendar window, with descriptive strings, like this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1668
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1669 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1670 (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1671 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1672
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1673 @node Date Display Format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1674 @subsubsection Date Display Format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1675 @vindex calendar-date-display-form
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1676
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1677 You can customize the manner of displaying dates in the diary, in mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1678 lines, and in messages by setting @code{calendar-date-display-form}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1679 This variable holds a list of expressions that can involve the variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1680 @code{month}, @code{day}, and @code{year}, which are all numbers in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1681 string form, and @code{monthname} and @code{dayname}, which are both
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1682 alphabetic strings. In the American style, the default value of this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1683 list is as follows:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1684
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1685 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1686 ((if dayname (concat dayname ", ")) monthname " " day ", " year)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1687 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1688
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1689 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1690 while in the European style this value is the default:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1691
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1692 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1693 ((if dayname (concat dayname ", ")) day " " monthname " " year)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1694 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1695
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1696 +@noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1697 The ISO standard date representation is this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1698
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1699 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1700 (year "-" month "-" day)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1701 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1702
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1703 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1704 This specifies a typical American format:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1705
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1706 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1707 (month "/" day "/" (substring year -2))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1708 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1709
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1710 @node Time Display Format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1711 @subsubsection Time Display Format
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1712 @vindex calendar-time-display-form
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1713
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1714 The calendar and diary by default display times of day in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1715 conventional American style with the hours from 1 through 12, minutes,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1716 and either @samp{am} or @samp{pm}. If you prefer the European style,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1717 also known in the US as military, in which the hours go from 00 to 23,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1718 you can alter the variable @code{calendar-time-display-form}. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1719 variable is a list of expressions that can involve the variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1720 @code{12-hours}, @code{24-hours}, and @code{minutes}, which are all
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1721 numbers in string form, and @code{am-pm} and @code{time-zone}, which are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1722 both alphabetic strings. The default value of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1723 @code{calendar-time-display-form} is as follows:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1724
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1725 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1726 (12-hours ":" minutes am-pm
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1727 (if time-zone " (") time-zone (if time-zone ")"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1728 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1729
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1730 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1731 Here is a value that provides European style times:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1732
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1733 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1734 (24-hours ":" minutes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1735 (if time-zone " (") time-zone (if time-zone ")"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1736 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1737
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1738 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1739 gives military-style times like @samp{21:07 (UT)} if time zone names are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1740 defined, and times like @samp{21:07} if they are not.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1741
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1742 @node Daylight Savings
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1743 @subsubsection Daylight Savings Time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1744 @cindex daylight savings time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1745
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1746 Emacs understands the difference between standard time and daylight
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1747 savings time---the times given for sunrise, sunset, solstices,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1748 equinoxes, and the phases of the moon take that into account. The rules
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1749 for daylight savings time vary from place to place and have also varied
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1750 historically from year to year. To do the job properly, Emacs needs to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1751 know which rules to use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1752
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1753 Some operating systems keep track of the rules that apply to the place
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1754 where you are; on these systems, Emacs gets the information it needs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1755 from the system automatically. If some or all of this information is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1756 missing, Emacs fills in the gaps with the rules currently used in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1757 Cambridge, Massachusetts. If the resulting rules are not what you want,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1758 you can tell Emacs the rules to use by setting certain variables.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1759
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1760 @vindex calendar-daylight-savings-starts
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1761 @vindex calendar-daylight-savings-ends
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1762 If the default choice of rules is not appropriate for your location,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1763 you can tell Emacs the rules to use by setting the variables
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1764 @code{calendar-daylight-savings-starts} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1765 @code{calendar-daylight-savings-ends}. Their values should be Lisp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1766 expressions that refer to the variable @code{year}, and evaluate to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1767 Gregorian date on which daylight savings time starts or (respectively)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1768 ends, in the form of a list @code{(@var{month} @var{day} @var{year})}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1769 The values should be @code{nil} if your area does not use daylight
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1770 savings time.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1771
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1772 Emacs uses these expressions to determine the starting date of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1773 daylight savings time for the holiday list and for correcting times of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1774 day in the solar and lunar calculations.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1775
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1776 The values for Cambridge, Massachusetts are as follows:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1777
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1778 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1779 @group
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1780 (calendar-nth-named-day 1 0 4 year)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1781 (calendar-nth-named-day -1 0 10 year)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1782 @end group
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1783 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1784
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1785 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1786 That is, the first 0th day (Sunday) of the fourth month (April) in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1787 the year specified by @code{year}, and the last Sunday of the tenth month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1788 (October) of that year. If daylight savings time were
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1789 changed to start on October 1, you would set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1790 @code{calendar-daylight-savings-starts} to this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1791
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1792 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1793 (list 10 1 year)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1794 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1795
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1796 For a more complex example, suppose daylight savings time begins on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1797 the first of Nisan on the Hebrew calendar. You should set
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1798 @code{calendar-daylight-savings-starts} to this value:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1799
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1800 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1801 (calendar-gregorian-from-absolute
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1802 (calendar-absolute-from-hebrew
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1803 (list 1 1 (+ year 3760))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1804 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1805
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1806 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1807 because Nisan is the first month in the Hebrew calendar and the Hebrew
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1808 year differs from the Gregorian year by 3760 at Nisan.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1809
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1810 If there is no daylight savings time at your location, or if you want
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1811 all times in standard time, set @code{calendar-daylight-savings-starts}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1812 and @code{calendar-daylight-savings-ends} to @code{nil}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1813
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1814 @vindex calendar-daylight-time-offset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1815 The variable @code{calendar-daylight-time-offset} specifies the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1816 difference between daylight savings time and standard time, measured in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1817 minutes. The value for Cambridge, Massachusetts is 60.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1818
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1819 @c @vindex calendar-daylight-savings-starts-time too long!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1820 @vindex calendar-daylight-savings-ends-time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1821 The two variables @code{calendar-daylight-savings-starts-time} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1822 @code{calendar-daylight-savings-ends-time} specify the number of minutes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1823 after midnight local time when the transition to and from daylight
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1824 savings time should occur. For Cambridge, Massachusetts both variables'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1825 values are 120.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1826
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1827 @node Diary Customizing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1828 @subsubsection Customizing the Diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1829
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1830 @vindex holidays-in-diary-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1831 Ordinarily, the mode line of the diary buffer window indicates any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1832 holidays that fall on the date of the diary entries. The process of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1833 checking for holidays can take several seconds, so including holiday
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1834 information delays the display of the diary buffer noticeably. If you'd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1835 prefer to have a faster display of the diary buffer but without the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1836 holiday information, set the variable @code{holidays-in-diary-buffer} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1837 @code{nil}.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1838
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1839 @vindex number-of-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1840 The variable @code{number-of-diary-entries} controls the number of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1841 days of diary entries to be displayed at one time. It affects the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1842 initial display when @code{view-diary-entries-initially} is @code{t}, as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1843 well as the command @kbd{M-x diary}. For example, the default value is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1844 1, which says to display only the current day's diary entries. If the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1845 value is 2, both the current day's and the next day's entries are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1846 displayed. The value can also be a vector of seven elements: for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1847 example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1848 appear on Sunday, the current date's and the next day's diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1849 appear Monday through Thursday, Friday through Monday's entries appear
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1850 on Friday, while on Saturday only that day's entries appear.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1851
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1852 @vindex print-diary-entries-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1853 @findex print-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1854 The variable @code{print-diary-entries-hook} is a normal hook run
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1855 after preparation of a temporary buffer containing just the diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1856 entries currently visible in the diary buffer. (The other, irrelevant
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1857 diary entries are really absent from the temporary buffer; in the diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1858 buffer, they are merely hidden.) The default value of this hook does
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1859 the printing with the command @code{lpr-buffer}. If you want to use a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1860 different command to do the printing, just change the value of this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1861 hook. Other uses might include, for example, rearranging the lines into
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1862 order by day and time.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1863
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1864 @vindex diary-date-forms
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1865 You can customize the form of dates in your diary file, if neither the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1866 standard American nor European styles suits your needs, by setting the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1867 variable @code{diary-date-forms}. This variable is a list of patterns
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1868 for recognizing a date. Each date pattern is a list whose elements may
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1869 be regular expressions (@pxref{Regexps}) or the symbols
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1870 @code{month}, @code{day}, @code{year}, @code{monthname}, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1871 @code{dayname}. All these elements serve as patterns that match certain
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1872 kinds of text in the diary file. In order for the date pattern, as a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1873 whole, to match, all of its elements must match consecutively.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1874
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1875 A regular expression in a date pattern matches in its usual fashion,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1876 using the standard syntax table altered so that @samp{*} is a word
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1877 constituent.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1878
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1879 The symbols @code{month}, @code{day}, @code{year}, @code{monthname},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1880 and @code{dayname} match the month number, day number, year number,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1881 month name, and day name of the date being considered. The symbols that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1882 match numbers allow leading zeros; those that match names allow
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1883 three-letter abbreviations and capitalization. All the symbols can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1884 match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1885 month'', and so on, it should match regardless of the date being
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1886 considered.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1887
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1888 The default value of @code{diary-date-forms} in the American style is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1889 this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1890
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1891 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1892 ((month "/" day "[^/0-9]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1893 (month "/" day "/" year "[^0-9]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1894 (monthname " *" day "[^,0-9]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1895 (monthname " *" day ", *" year "[^0-9]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1896 (dayname "\\W"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1897 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1898
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1899 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1900 Emacs matches of the diary entries with the date forms is done with the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1901 standard syntax table from Fundamental mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1902 (@pxref{Syntax Tables,,,lispref,XEmacs Lisp Reference Manual}),
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1903 but with the @samp{*} changed so that it is a word constituent.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1904
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1905 The date patterns in the list must be @emph{mutually exclusive} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1906 must not match any portion of the diary entry itself, just the date and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1907 one character of whitespace. If, to be mutually exclusive, the pattern
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1908 must match a portion of the diary entry text---beyond the whitespace
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1909 that ends the date---then the first element of the date pattern
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1910 @emph{must} be @code{backup}. This causes the date recognizer to back
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1911 up to the beginning of the current word of the diary entry, after
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1912 finishing the match. Even if you use @code{backup}, the date pattern
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1913 must absolutely not match more than a portion of the first word of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1914 diary entry. The default value of @code{diary-date-forms} in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1915 European style is this list:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1916
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1917 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1918 ((day "/" month "[^/0-9]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1919 (day "/" month "/" year "[^0-9]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1920 (backup day " *" monthname "\\W+\\<[^*0-9]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1921 (day " *" monthname " *" year "[^0-9]")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1922 (dayname "\\W"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1923 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1924
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1925 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1926 Notice the use of @code{backup} in the third pattern, because it needs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1927 to match part of a word beyond the date itself to distinguish it from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1928 the fourth pattern.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1929
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1930 @node Hebrew/Islamic Entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1931 @subsubsection Hebrew- and Islamic-Date Diary Entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1932
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1933 Your diary file can have entries based on Hebrew or Islamic dates, as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1934 well as entries based on the world-standard Gregorian calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1935 However, because recognition of such entries is time-consuming and most
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1936 people don't use them, you must explicitly enable their use. If you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1937 want the diary to recognize Hebrew-date diary entries, for example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1938 you must do this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1939
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1940 @vindex nongregorian-diary-listing-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1941 @vindex nongregorian-diary-marking-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1942 @findex list-hebrew-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1943 @findex mark-hebrew-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1944 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1945 (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1946 (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1947 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1948
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1949 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1950 If you want Islamic-date entries, do this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1951
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1952 @findex list-islamic-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1953 @findex mark-islamic-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1954 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1955 (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1956 (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1957 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1958
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1959 Hebrew- and Islamic-date diary entries have the same formats as
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1960 Gregorian-date diary entries, except that @samp{H} precedes a Hebrew
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1961 date and @samp{I} precedes an Islamic date. Moreover, because the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1962 Hebrew and Islamic month names are not uniquely specified by the first
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1963 three letters, you may not abbreviate them. For example, a diary entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1964 for the Hebrew date Heshvan 25 could look like this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1965
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1966 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1967 HHeshvan 25 Happy Hebrew birthday!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1968 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1969
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1970 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1971 and would appear in the diary for any date that corresponds to Heshvan 25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1972 on the Hebrew calendar. And here is Islamic-date diary entry that matches
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1973 Dhu al-Qada 25:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1974
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1975 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1976 IDhu al-Qada 25 Happy Islamic birthday!
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1977 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1978
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1979 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1980 and would appear in the diary for any date that corresponds to Dhu al-Qada 25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1981 on the Islamic calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1982
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1983 As with Gregorian-date diary entries, Hebrew- and Islamic-date entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1984 are nonmarking if they are preceded with an ampersand (@samp{&}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1985
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1986 Here is a table of commands used in the calendar to create diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1987 that match the selected date and other dates that are similar in the Hebrew
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1988 or Islamic calendar:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1989
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1990 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1991 @item i h d
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1992 Add a diary entry for the Hebrew date corresponding to the selected date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1993 (@code{insert-hebrew-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1994 @item i h m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1995 Add a diary entry for the day of the Hebrew month corresponding to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1996 selected date (@code{insert-monthly-hebrew-diary-entry}). This diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1997 entry matches any date that has the same Hebrew day-within-month as the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1998 selected date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1999 @item i h y
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2000 Add a diary entry for the day of the Hebrew year corresponding to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2001 selected date (@code{insert-yearly-hebrew-diary-entry}). This diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2002 entry matches any date which has the same Hebrew month and day-within-month
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2003 as the selected date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2004 @item i i d
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2005 Add a diary entry for the Islamic date corresponding to the selected date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2006 (@code{insert-islamic-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2007 @item i i m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2008 Add a diary entry for the day of the Islamic month corresponding to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2009 selected date (@code{insert-monthly-islamic-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2010 @item i i y
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2011 Add a diary entry for the day of the Islamic year corresponding to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2012 selected date (@code{insert-yearly-islamic-diary-entry}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2013 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2014
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2015 @findex insert-hebrew-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2016 @findex insert-monthly-hebrew-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2017 @findex insert-yearly-hebrew-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2018 @findex insert-islamic-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2019 @findex insert-monthly-islamic-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2020 @findex insert-yearly-islamic-diary-entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2021 These commands work much like the corresponding commands for ordinary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2022 diary entries: they apply to the date that point is on in the calendar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2023 window, and what they do is insert just the date portion of a diary entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2024 at the end of your diary file. You must then insert the rest of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2025 diary entry.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2026
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2027 @node Fancy Diary Display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2028 @subsubsection Fancy Diary Display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2029 @vindex diary-display-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2030 @findex simple-diary-display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2031
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2032 Diary display works by preparing the diary buffer and then running the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2033 hook @code{diary-display-hook}. The default value of this hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2034 (@code{simple-diary-display}) hides the irrelevant diary entries and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2035 then displays the buffer. However, if you specify the hook as follows,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2036
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2037 @cindex diary buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2038 @findex fancy-diary-display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2039 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2040 (add-hook 'diary-display-hook 'fancy-diary-display)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2041 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2042
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2043 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2044 this enables fancy diary display. It displays diary entries and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2045 holidays by copying them into a special buffer that exists only for the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2046 sake of display. Copying to a separate buffer provides an opportunity
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2047 to change the displayed text to make it prettier---for example, to sort
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2048 the entries by the dates they apply to.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2049
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2050 As with simple diary display, you can print a hard copy of the buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2051 with @code{print-diary-entries}. To print a hard copy of a day-by-day
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2052 diary for a week by positioning point on Sunday of that week, type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2053 @kbd{7 d} and then do @kbd{M-x print-diary-entries}. As usual, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2054 inclusion of the holidays slows down the display slightly; you can speed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2055 things up by setting the variable @code{holidays-in-diary-buffer} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2056 @code{nil}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2057
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2058 @vindex diary-list-include-blanks
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2059 Ordinarily, the fancy diary buffer does not show days for which there are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2060 no diary entries, even if that day is a holiday. If you want such days to be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2061 shown in the fancy diary buffer, set the variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2062 @code{diary-list-include-blanks} to @code{t}.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2063
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2064 @cindex sorting diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2065 If you use the fancy diary display, you can use the normal hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2066 @code{list-diary-entries-hook} to sort each day's diary entries by their
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
2067 time of day. Add this line to your init file:
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2068
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2069 @findex sort-diary-entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2070 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2071 (add-hook 'list-diary-entries-hook 'sort-diary-entries t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2072 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2073
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
2074 @xref{Init File}.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
2075
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2076 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2077 For each day, this sorts diary entries that begin with a recognizable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2078 time of day according to their times. Diary entries without times come
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2079 first within each day.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2080
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2081 @node Included Diary Files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2082 @subsubsection Included Diary Files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2083
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2084 Fancy diary display also has the ability to process included diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2085 files. This permits a group of people to share a diary file for events
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2086 that apply to all of them. Lines in the diary file of this form:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2087
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2088 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2089 #include "@var{filename}"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2090 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2091
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2092 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2093 includes the diary entries from the file @var{filename} in the fancy
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2094 diary buffer. The include mechanism is recursive, so that included files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2095 can include other files, and so on; you must be careful not to have a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2096 cycle of inclusions, of course. Here is how to enable the include
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2097 facility:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2098
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2099 @vindex list-diary-entries-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2100 @vindex mark-diary-entries-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2101 @findex include-other-diary-files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2102 @findex mark-included-diary-files
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2103 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2104 (add-hook 'list-diary-entries-hook 'include-other-diary-files)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2105 (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2106 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2108 The include mechanism works only with the fancy diary display, because
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2109 ordinary diary display shows the entries directly from your diary file.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2110
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2111 @node Sexp Diary Entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2112 @subsubsection Sexp Entries and the Fancy Diary Display
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2113 @cindex sexp diary entries
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2115 Sexp diary entries allow you to do more than just have complicated
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2116 conditions under which a diary entry applies. If you use the fancy
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2117 diary display, sexp entries can generate the text of the entry depending
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2118 on the date itself. For example, an anniversary diary entry can insert
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2119 the number of years since the anniversary date into the text of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2120 diary entry. Thus the @samp{%d} in this dairy entry:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2121
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2122 @findex diary-anniversary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2123 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2124 %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2125 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2126
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2127 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2128 gets replaced by the age, so on October 31, 1990 the entry appears in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2129 the fancy diary buffer like this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2130
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2131 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2132 Arthur's birthday (42 years old)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2133 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2134
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2135 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2136 If the diary file instead contains this entry:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2137
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2138 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2139 %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2140 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2141
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2142 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2143 the entry in the fancy diary buffer for October 31, 1990 appears like this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2144
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2145 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2146 Arthur's 42nd birthday
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2147 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2148
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2149 Similarly, cyclic diary entries can interpolate the number of repetitions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2150 that have occurred:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2151
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2152 @findex diary-cyclic
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2153 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2154 %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2155 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2157 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2158 looks like this:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2159
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2160 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2161 Renew medication (5th time)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2162 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2163
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2164 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2165 in the fancy diary display on September 8, 1990.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2166
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2167 The generality of sexp diary entries lets you specify any diary entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2168 that you can describe algorithmically. A sexp diary entry contains an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2169 expression that computes whether the entry applies to any given date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2170 If its value is non-@code{nil}, the entry applies to that date;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2171 otherwise, it does not. The expression can use the variable @code{date}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2172 to find the date being considered; its value is a list (@var{month}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2173 @var{day} @var{year}) that refers to the Gregorian calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2174
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2175 Suppose you get paid on the 21st of the month if it is a weekday, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2176 on the Friday before if the 21st is on a weekend. Here is how to write
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2177 a sexp diary entry that matches those dates:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2178
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2179 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2180 &%%(let ((dayname (calendar-day-of-week date))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2181 (day (car (cdr date))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2182 (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2183 (and (memq day '(19 20)) (= dayname 5)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2184 ) Pay check deposited
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2185 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2186
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2187 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2188 applies to just those dates. This example illustrates how the sexp can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2189 depend on the variable @code{date}; this variable is a list (@var{month}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2190 @var{day} @var{year}) that gives the Gregorian date for which the diary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2191 entries are being found. If the value of the expression is @code{t},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2192 the entry applies to that date. If the expression evaluates to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2193 @code{nil}, the entry does @emph{not} apply to that date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2194
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2195 The following sexp diary entries take advantage of the ability (in the fancy
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2196 diary display) to concoct diary entries whose text varies based on the date:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2197
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2198 @findex diary-sunrise-sunset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2199 @findex diary-phases-of-moon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2200 @findex diary-day-of-year
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2201 @findex diary-iso-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2202 @findex diary-julian-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2203 @findex diary-astro-day-number
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2204 @findex diary-hebrew-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2205 @findex diary-islamic-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2206 @findex diary-french-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2207 @findex diary-mayan-date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2208 @table @code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2209 @item %%(diary-sunrise-sunset)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2210 Make a diary entry for the local times of today's sunrise and sunset.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2211 @item %%(diary-phases-of-moon)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2212 Make a diary entry for the phases (quarters) of the moon.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2213 @item %%(diary-day-of-year)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2214 Make a diary entry with today's day number in the current year and the number
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2215 of days remaining in the current year.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2216 @item %%(diary-iso-date)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2217 Make a diary entry with today's equivalent ISO commercial date.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2218 @item %%(diary-julian-date)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2219 Make a diary entry with today's equivalent date on the Julian calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2220 @item %%(diary-astro-day-number)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2221 Make a diary entry with today's equivalent astronomical (Julian) day number.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2222 @item %%(diary-hebrew-date)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2223 Make a diary entry with today's equivalent date on the Hebrew calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2224 @item %%(diary-islamic-date)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2225 Make a diary entry with today's equivalent date on the Islamic calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2226 @item %%(diary-french-date)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2227 Make a diary entry with today's equivalent date on the French Revolutionary
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2228 calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2229 @item %%(diary-mayan-date)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2230 Make a diary entry with today's equivalent date on the Mayan calendar.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2231 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2232
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2233 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2234 Thus including the diary entry
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2236 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2237 &%%(diary-hebrew-date)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2238 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2239
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2240 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2241 causes every day's diary display to contain the equivalent date on the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2242 Hebrew calendar, if you are using the fancy diary display. (With simple
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2243 diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2244 diary for any date, but does nothing particularly useful.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2245
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2246 These functions can be used to construct sexp diary entries based on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2247 the Hebrew calendar in certain standard ways:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2248
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2249 @cindex rosh hodesh
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2250 @findex diary-rosh-hodesh
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2251 @cindex parasha, weekly
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2252 @findex diary-parasha
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2253 @cindex candle lighting times
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2254 @findex diary-sabbath-candles
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2255 @cindex omer count
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2256 @findex diary-omer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2257 @cindex yahrzeits
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2258 @findex diary-yahrzeit
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2259 @table @code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2260 @item %%(diary-rosh-hodesh)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2261 Make a diary entry that tells the occurrence and ritual announcement of each
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2262 new Hebrew month.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2263 @item %%(diary-parasha)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2264 Make a Saturday diary entry that tells the weekly synagogue scripture reading.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2265 @item %%(diary-sabbath-candles)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2266 Make a Friday diary entry that tells the @emph{local time} of Sabbath
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2267 candle lighting.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2268 @item %%(diary-omer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2269 Make a diary entry that gives the omer count, when appropriate.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2270 @item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2271 Make a diary entry marking the anniversary of a date of death. The date
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2272 is the @emph{Gregorian} (civil) date of death. The diary entry appears
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2273 on the proper Hebrew calendar anniversary and on the day before. (In
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2274 the European style, the order of the parameters is changed to @var{day},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2275 @var{month}, @var{year}.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2276 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2277
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2278 @node Appt Customizing
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2279 @subsubsection Customizing Appointment Reminders
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2280
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2281 You can specify exactly how Emacs reminds you of an appointment, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2282 how far in advance it begins doing so, by setting these variables:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2283
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2284 @vindex appt-message-warning-time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2285 @vindex appt-audible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2286 @vindex appt-visible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2287 @vindex appt-display-mode-line
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2288 @vindex appt-msg-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2289 @vindex appt-display-duration
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2290 @table @code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2291 @item appt-message-warning-time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2292 The time in minutes before an appointment that the reminder begins. The
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2293 default is 10 minutes.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2294 @item appt-audible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2295 If this is @code{t} (the default), Emacs rings the terminal bell for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2296 appointment reminders.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2297 @item appt-visible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2298 If this is @code{t} (the default), Emacs displays the appointment
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2299 message in echo area.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2300 @item appt-display-mode-line
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2301 If this is @code{t} (the default), Emacs displays the number of minutes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2302 to the appointment on the mode line.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2303 @item appt-msg-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2304 If this is @code{t} (the default), Emacs displays the appointment
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2305 message in another window.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2306 @item appt-display-duration
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2307 The number of seconds an appointment message is displayed. The default
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2308 is 5 seconds.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2309 @end table