annotate man/xemacs/calendar.texi @ 323:4dbe6856a8dc r21-0-59

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