annotate man/xemacs/calendar.texi @ 0:376386a54a3c r19-14

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