annotate lispref/calendar.texi @ 6672:12aafd560832

(calendar-cursor-to-date): Fix to signal error when appropriate.
author Roland McGrath <roland@gnu.org>
date Tue, 05 Apr 1994 01:34:09 +0000
parents b06d5c68be5a
children afe506bf7264
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 @c -*-texinfo-*-
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2 @c This is part of the GNU Emacs Lisp Reference Manual.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3 @c Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 @c See the file elisp.texi for copying conditions.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 @node Calendar, Tips, Display, Top
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 @chapter Customizing the Calendar and Diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 There are many customizations that you can use to make the calendar and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 diary suit your personal tastes.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 @menu
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 * Calendar Customizing:: Defaults you can set.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 * Holiday Customizing:: Defining your own holidays.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 * Date Display Format:: Changing the format.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 * Time Display Format:: Changing the format.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 * Daylight Savings:: Changing the default.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 * Diary Customizing:: Defaults you can set.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 * Hebrew/Islamic Entries:: How to obtain them.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 * Fancy Diary Display:: Enhancing the diary display, sorting entries.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20 * Included Diary Files:: Sharing a common diary file.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 * Sexp Diary Entries:: Fancy things you can do.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 * Appt Customizing:: Customizing appointment reminders.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23 @end menu
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 @node Calendar Customizing
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 @section Customizing the Calendar
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 @vindex view-diary-entries-initially
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 If you set the variable @code{view-diary-entries-initially} to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 @code{t}, calling up the calendar automatically displays the diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 entries for the current date as well. The diary dates appear only if
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 the current date is visible. If you add both of the following lines to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 your @file{.emacs} file:@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 (setq view-diary-entries-initially t)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 (calendar)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 they display both the calendar and diary windows whenever you start Emacs.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 @vindex view-calendar-holidays-initially
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 Similarly, if you set the variable
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 @code{view-calendar-holidays-initially} to @code{t}, entering the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 calendar automatically displays a list of holidays for the current three
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 month period. The holiday list appears in a separate window.@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
48
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 @vindex mark-diary-entries-in-calendar
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 You can set the variable @code{mark-diary-entries-in-calendar} to @code{t}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 in order to place a plus sign (@samp{+}) beside any dates with diary entries.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 Whenever the calendar window is displayed or redisplayed, the diary entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 are automatically marked for holidays.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 @vindex mark-holidays-in-calendar
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 Similarly, setting the variable @code{mark-holidays-in-calendar} to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 @code{t} places an asterisk (@samp{*}) after all holiday dates visible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 in the calendar window.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 @vindex calendar-load-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 There are many customizations that you can make with the hooks
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 provided. For example, the variable @code{calendar-load-hook}, whose
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63 default value is @code{nil}, is a normal hook run when the calendar
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 package is first loaded (before actually starting to display the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 calendar).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 @vindex initial-calendar-window-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68 The variable @code{initial-calendar-window-hook}, whose default value
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 is @code{nil}, is a normal hook run the first time the calendar window
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 is displayed. The function is invoked only when you first enter
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 Calendar mode, not when you redisplay an existing Calendar window. But
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 if you leave the calendar with the @kbd{q} command and reenter it, the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 hook runs again.@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 @vindex today-visible-calendar-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76 The variable @code{today-visible-calendar-hook}, whose default value
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 is @code{nil}, is a normal hook run after the calendar buffer has been
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
78 prepared with the calendar when the current date is visible in the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 window. One use of this hook is to replace today's date with asterisks;
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 a function @code{calendar-star-date} is included for this purpose. In
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81 your @file{.emacs} file, put:@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83 @findex calendar-star-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
85 (setq today-visible-calendar-hook 'calendar-star-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89 Another standard hook function adds asterisks around the current date.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 Here's how to use it:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92 @findex calendar-mark-today
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94 (setq today-visible-calendar-hook 'calendar-mark-today)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 @vindex today-invisible-calendar-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 A corresponding variable, @code{today-invisible-calendar-hook}, whose
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 default value is @code{nil}, is a normal hook run after the calendar
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
101 buffer text has been prepared, if the current date is @emph{not} visible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 in the window.@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
104 @node Holiday Customizing
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 @section Customizing the Holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
106
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 @vindex calendar-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
108 @vindex christian-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 @vindex hebrew-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
110 @vindex islamic-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 Emacs knows about holidays defined by entries on one of several lists.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 You can customize theses lists of holidays to your own needs, adding
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 holidays or deleting lists of holidays. The lists of holidays that
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
114 Emacs uses are for general holidays (@code{general-holidays}), local
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
115 holidays (@code{local-holidays}), Christian holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116 (@code{christian-holidays}), Hebrew (Jewish) holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 (@code{hebrew-holidays}), Islamic (Moslem) holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 (@code{islamic-holidays}), and other holidays (@code{other-holidays}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 @vindex general-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 The general holidays are, by default, holidays common throughout the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 United States. To eliminate these holidays, set @code{general-holidays}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 to @code{nil}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 @vindex local-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 There are no default local holidays (but sites may supply some). You
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 can set the variable @code{local-holidays} to any list of holidays, as
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 described below.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
129
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 @vindex all-christian-calendar-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 @vindex all-hebrew-calendar-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 @vindex all-islamic-calendar-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133 By default, Emacs does not consider all the holidays of these
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 religions, only those commonly found in secular calendars. For a more
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
135 extensive collection of religious holidays, you can set any (or all) of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 the variables @code{all-christian-calendar-holidays},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 @code{all-hebrew-calendar-holidays}, or
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 @code{all-islamic-calendar-holidays} to @code{t}. If you want to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 eliminate the religious holidays, set any or all of the corresponding
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 variables @code{christian-holidays}, @code{hebrew-holidays}, and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141 @code{islamic-holidays} to @code{nil}.@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 @vindex other-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 You can set the variable @code{other-holidays} to any list of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145 holidays. This list, normally empty, is intended for your use.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 @cindex holiday forms
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 Each of the lists (@code{general-holidays}, @code{local-holidays},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 @code{christian-holidays}, @code{hebrew-holidays},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 @code{islamic-holidays}, and @code{other-holidays}) is a list of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151 @dfn{holiday forms}, each holiday form describing a holiday (or
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 sometimes a list of holidays). Holiday forms may have the following
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 formats:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 @table @code
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 @item (holiday-fixed @var{month} @var{day} @var{string})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 A fixed date on the Gregorian calendar. @var{month} and @var{day} are
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 numbers, @var{string} is the name of the holiday.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
160 @item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
162 (@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163 from the end of the month. @var{string} is the name of the holiday.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 @item (holiday-hebrew @var{month} @var{day} @var{string})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 A fixed date on the Hebrew calendar. @var{month} and @var{day} are
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 numbers, @var{string} is the name of the holiday.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 @item (holiday-islamic @var{month} @var{day} @var{string})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 A fixed date on the Islamic calendar. @var{month} and @var{day} are
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 numbers, @var{string} is the name of the holiday.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 @item (holiday-julian @var{month} @var{day} @var{string})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 A fixed date on the Julian calendar. @var{month} and @var{day} are
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 numbers, @var{string} is the name of the holiday.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177 @item (holiday-sexp @var{sexp} @var{string})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178 @var{sexp} is a Lisp expression that should use the variable @code{year}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 to compute the date of a holiday, or @code{nil} if the holiday doesn't
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
180 happen this year. The value represents the date as a list of the form
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 @code{(@var{month} @var{day} @var{year})}. @var{string} is the name of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182 the holiday.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
183
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184 @item (if @var{boolean} @var{holiday-form} &optional @var{holiday-form})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 A choice between two holidays based on the value of @var{boolean}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
186
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187 @item (@var{function} &optional @var{args})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188 Dates requiring special computation; @var{args}, if any, are passed in
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
189 a list to the function @code{calendar-holiday-function-@var{function}}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190 @end table
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
192 For example, suppose you want to add Bastille Day, celebrated in
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193 France on July 14. You can do this by adding the following line
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 to your @file{.emacs} file:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
197 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
198 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
202 fourteenth day of the seventh month (July).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
204 Many holidays occur on a specific day of the week, at a specific time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
205 of month. Here is a holiday form describing Hurricane Supplication Day,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
206 celebrated in the Virgin Islands on the fourth Monday in August:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
207
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
208 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
209 (holiday-float 8 1 4 "Hurricane Supplication Day")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
210 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
211
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
212 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215 the month (1 specifies the first occurrence, 2 the second occurrence,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 @minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217 so on).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
218
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219 You can specify holidays that occur on fixed days of the Hebrew,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220 Islamic, and Julian calendars too. For example,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
221
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223 (setq other-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
224 '((holiday-hebrew 10 2 "Last day of Hanukkah")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
225 (holiday-islamic 3 12 "Mohammed's Birthday")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226 (holiday-julian 4 2 "Jefferson's Birthday")))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
227 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
229 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230 adds the last day of Hanukkah (since the Hebrew months are numbered with
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 1 starting from Nisan), the Islamic feast celebrating Mohammed's
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 birthday (since the Islamic months are numbered from 1 starting with
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233 Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
234 Julian calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
235
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
236 To include a holiday conditionally, use either the @samp{if} or the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
237 @samp{sexp} form. For example, American presidential elections occur on
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
238 the first Tuesday after the first Monday in November of years divisible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 by 4:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
241 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242 (holiday-sexp (if (= 0 (% year 4))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243 (calendar-gregorian-from-absolute
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244 (1+ (calendar-dayname-on-or-before
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
245 1 (+ 6 (calendar-absolute-from-gregorian
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
246 (list 11 1 year))))))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
247 "US Presidential Election"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
250 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
251 or
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
252
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
253 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
254 (if (= 0 (% displayed-year 4))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
255 (fixed 11
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
256 (extract-calendar-day
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
257 (calendar-gregorian-from-absolute
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
258 (1+ (calendar-dayname-on-or-before
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259 1 (+ 6 (calendar-absolute-from-gregorian
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
260 (list 11 1 displayed-year)))))))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
261 "US Presidential Election"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
262 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
263
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 Some holidays just don't fit into any of these forms because special
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
265 calculations are involved in their determination. In such cases you
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
266 must write a Lisp function to do the calculation. To include
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267 eclipses of the sun, for example, add @code{(eclipses)} to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268 @code{other-holidays} and write an Emacs Lisp function
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 @code{eclipses} that returns a (possibly
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
270 empty) list of the relevant Gregorian dates among the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 range visible in the calendar window, with descriptive strings, like
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278 @node Date Display Format
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 @section Date Display Format
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 @vindex calendar-date-display-form
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
281
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
282 You can customize the manner of displaying dates in the diary,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
283 in mode lines, and in messages by setting
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
284 @code{calendar-date-display-form}. This variable is a list of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
285 expressions that can involve the variables @code{month}, @code{day}, and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
286 @code{year}, all numbers in string form, and @code{monthname} and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287 @code{dayname}, both alphabetic strings. In the American style, the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288 default value of this list is as follows:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
291 ((if dayname (concat dayname ", ")) monthname " " day ", " year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
295 while in the European style this value is the default:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
296
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
297 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
298 ((if dayname (concat dayname ", ")) day " " monthname " " year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
299 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
300
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
301 The ISO standard date representation is this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
302
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
304 (year "-" month "-" day)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
305 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
306
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
307 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308 This specifies a typical American format:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
310 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
311 (month "/" day "/" (substring year -2))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
312 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314 @node Time Display Format
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
315 @section Time Display Format
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
316 @vindex calendar-time-display-form
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
317
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
318 In the calendar, diary, and related buffers, Emacs displays times of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
319 day in the conventional American style with the hours from 1 through 12,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
320 minutes, and either @samp{am} or @samp{pm}. If you prefer the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
321 ``military'' (European) style of writing times---in which the hours go
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
322 from 00 to 23---you can alter the variable
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
323 @code{calendar-time-display-form}. This variable is a list of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324 expressions that can involve the variables @code{12-hours},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
325 @code{24-hours}, and @code{minutes}, all numbers in string form, and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
326 @code{am-pm} and @code{time-zone}, both alphabetic strings. The default
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
327 definition of @code{calendar-time-display-form} is as follows:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
328
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
329 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
330 (12-hours ":" minutes am-pm
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
331 (if time-zone " (") time-zone (if time-zone ")"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
332 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
333
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
334 Setting @code{calendar-time-display-form} to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
335
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
336 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
337 (24-hours ":" minutes
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
338 (if time-zone " (") time-zone (if time-zone ")"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
339 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
340
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
341 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
342 gives military-style times like @samp{21:07 (UT)} if time zone names are
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
343 defined, and times like @samp{21:07} if they are not.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
344
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
345 @node Daylight Savings
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
346 @section Daylight Savings Time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
347 @cindex daylight savings time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
349 Emacs understands the difference between standard time and daylight
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
350 savings time---the times given for sunrise, sunset, solstices,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351 equinoxes, and the phases of the moon take that into account. The rules
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
352 for daylight savings time vary from place to place and have also varied
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
353 historically from year to year. To do the job properly, Emacs needs to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
354 know which rules to use.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
355
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
356 Some operating systems keep track of the rules that apply to the place
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
357 where you are; on these systems, Emacs gets the information it needs
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
358 from the system automatically. If some or all of this information is
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
359 missing, Emacs fills in the gaps with the rules currently used in
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
360 Cambridge, Massachusetts. If the default choice of rules is not
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
361 appropriate for your location, you can tell Emacs the rules to use by
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
362 setting certain variables.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
363
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
364 @vindex calendar-daylight-savings-starts
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
365 @vindex calendar-daylight-savings-ends
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
366 These variables are @code{calendar-daylight-savings-starts} together
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
367 with @code{calendar-daylight-savings-ends}. Their values should be Lisp
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
368 expressions that refer to the variable @code{year}, and evaluate to the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
369 Gregorian date on which daylight savings time starts or (respectively)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
370 ends, in the form of a list @code{(@var{month} @var{day} @var{year})}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
371 The values should be @code{nil} if your area does not use daylight
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
372 savings time.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
373
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
374 Emacs uses these expressions to determine the starting date of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
375 daylight savings time for the holiday list and for correcting times of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
376 day in the solar and lunar calculations.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
377
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
378 The values for Cambridge, Massachusetts are as follows:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
379
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
380 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
381 @group
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
382 (calendar-nth-named-day 1 0 4 year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
383 (calendar-nth-named-day -1 0 10 year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
384 @end group
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
385 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
386
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
387 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
388 i.e., the first 0th day (Sunday) of the fourth month (April) in
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
389 the year specified by @code{year}, and the last Sunday of the tenth month
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
390 (October) of that year. If daylight savings time were
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
391 changed to start on October 1, you would set
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
392 @code{calendar-daylight-savings-starts} to this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
393
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
394 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
395 (list 10 1 year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
396 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
397
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
398 For a more complex example, suppose daylight savings time begins on
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
399 the first of Nisan on the Hebrew calendar. You would set
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
400 @code{calendar-daylight-savings-starts} as follows:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
401
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
402 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
403 (calendar-gregorian-from-absolute
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
404 (calendar-absolute-from-hebrew
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
405 (list 1 1 (+ year 3760))))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
406 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
407
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
408 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
409 because Nisan is the first month in the Hebrew calendar and the Hebrew
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
410 year differs from the Gregorian year by 3760 at Nisan.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
411
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
412 If there is no daylight savings time at your location, or if you want
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
413 all times in standard time, set @code{calendar-daylight-savings-starts}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
414 and @code{calendar-daylight-savings-ends} to @code{nil}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
415
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
416 @vindex calendar-daylight-time-offset
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
417 This variable specifies the difference between daylight savings time and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
418 standard time, measured in minutes. The value for Cambridge is 60.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
419
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
420 @vindex calendar-daylight-savings-starts-time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
421 @vindex calendar-daylight-savings-ends-time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
422 These variables specify is the number of minutes after midnight local time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
423 when the transition to and from daylight savings time should occur. For
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
424 Cambridge, both variables' values are 120.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
425
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
426 @node Diary Customizing
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
427 @section Customizing the Diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
428
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
429 @vindex holidays-in-diary-buffer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
430 Ordinarily, the mode line of the diary buffer window indicates any
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
431 holidays that fall on the date of the diary entries. The process of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
432 checking for holidays can take several seconds, so including holiday
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
433 information delays the display of the diary buffer noticeably. If you'd
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
434 prefer to have a faster display of the diary buffer but without the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
435 holiday information, set the variable @code{holidays-in-diary-buffer} to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
436 @code{nil}.@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
437
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
438 @vindex number-of-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
439 The variable @code{number-of-diary-entries} controls the number of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
440 days of diary entries to be displayed at one time. It affects the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
441 initial display when @code{view-diary-entries-initially} is @code{t}, as
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
442 well as the command @kbd{M-x diary}. For example, the default value is
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
443 1, which says to display only the current day's diary entries. If the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
444 value is 2, both the current day's and the next day's entries are
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
445 displayed. The value can also be a vector of seven elements: if the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
446 value is @code{[0 2 2 2 2 4 1]} then no diary entries appear on Sunday,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
447 the current date's and the next day's diary entries appear Monday
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
448 through Thursday, Friday through Monday's entries appear on Friday,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
449 while on Saturday only that day's entries appear.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
450
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
451 @vindex print-diary-entries-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
452 @findex print-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
453 The variable @code{print-diary-entries-hook} is a normal hook run
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
454 after preparation of a temporary buffer containing just the diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
455 entries currently visible in the diary buffer. (The other, irrelevant
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
456 diary entries are really absent from the temporary buffer; in the diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
457 buffer, they are merely hidden.) The default value of this hook does
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
458 the printing with the command @code{lpr-buffer}. If you want to use a
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
459 different command to do the printing, just change the value of this
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
460 hook. Other uses might include, for example, rearranging the lines into
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
461 order by day and time.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
462
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
463 @vindex diary-date-forms
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
464 You can customize the form of dates in your diary file, if neither the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
465 standard American nor European styles suits your needs, by setting the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
466 variable @code{diary-date-forms}. This variable is a list of forms of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
467 dates recognized in the diary file. Each form is a list of regular
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
468 expressions (@pxref{Regular Expressions}) and the variables
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
469 @code{month}, @code{day}, @code{year}, @code{monthname}, and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
470 @code{dayname}. The variable @code{monthname} matches the name of the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
471 month, capitalized or not, or its three-letter abbreviation, followed by
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
472 a period or not; it matches @samp{*}. Similarly, @code{dayname} matches
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
473 the name of the day, capitalized or not, or its three-letter
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
474 abbreviation, followed by a period or not. The variables @code{month},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
475 @code{day}, and @code{year} match those numerical values, preceded by
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
476 arbitrarily many zeros; they also match @samp{*}. The default value of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
477 @code{diary-date-forms} in the American style is
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
478
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
479 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
480 ((month "/" day "[^/0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
481 (month "/" day "/" year "[^0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
482 (monthname " *" day "[^,0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
483 (monthname " *" day ", *" year "[^0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
484 (dayname "\\W"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
485 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
486
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
487 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
488 Emacs matches of the diary entries with the date forms is done with the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
489 standard syntax table from Fundamental mode (@pxref{Syntax Tables}), but
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
490 with the @samp{*} changed so that it is a word constituent.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
491
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
492 The forms on the list must be @emph{mutually exclusive} and must not
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
493 match any portion of the diary entry itself, just the date. If, to be
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
494 mutually exclusive, the pattern must match a portion of the diary entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
495 itself, the first element of the form @emph{must} be @code{backup}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
496 This causes the date recognizer to back up to the beginning of the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
497 current word of the diary entry. Even if you use @code{backup}, the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
498 form must absolutely not match more than a portion of the first word of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
499 the diary entry. The default value of @code{diary-date-forms} in the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
500 European style is this list:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
501
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
502 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
503 ((day "/" month "[^/0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
504 (day "/" month "/" year "[^0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
505 (backup day " *" monthname "\\W+\\<[^*0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
506 (day " *" monthname " *" year "[^0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
507 (dayname "\\W"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
508 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
509
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
510 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
511 Notice the use of @code{backup} in the middle form because part of the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
512 diary entry must be matched to distinguish this form from the following one.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
513
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
514 @node Hebrew/Islamic Entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
515 @section Hebrew- and Islamic-Date Diary Entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
516
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
517 Your diary file can have entries based on Hebrew or Islamic dates, as
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
518 well as entries based on our usual Gregorian calendar. However, because
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
519 the processing of such entries is time-consuming and most people don't
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
520 need them, you must customize the processing of your diary file to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
521 specify that you want such entries recognized. If you want Hebrew-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
522 diary entries, for example, you must include these lines in your
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
523 @file{.emacs} file:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
524
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
525 @vindex nongregorian-diary-listing-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
526 @vindex nongregorian-diary-marking-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
527 @findex list-hebrew-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
528 @findex mark-hebrew-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
529 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
530 (setq nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
531 (setq nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
532 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
533
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
534 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
535 If you want Islamic-date entries, include these lines in your
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
536 @file{.emacs} file:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
537
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
538 @findex list-islamic-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
539 @findex mark-islamic-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
540 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
541 (setq nongregorian-diary-listing-hook 'list-islamic-diary-entries)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
542 (setq nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
543 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
544
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
545 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
546 If you want both Hebrew- and Islamic-date entries, include these lines:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
547
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
548 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
549 (setq nongregorian-diary-listing-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
550 '(list-hebrew-diary-entries list-islamic-diary-entries))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
551 (setq nongregorian-diary-marking-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
552 '(mark-hebrew-diary-entries mark-islamic-diary-entries))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
553 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
554
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
555 Hebrew- and Islamic-date diary entries have the same formats as
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
556 Gregorian-date diary entries, except that the date must be preceded with
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
557 an @samp{H} for Hebrew dates and an @samp{I} for Islamic dates.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
558 Moreover, because the Hebrew and Islamic month names are not uniquely
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
559 specified by the first three letters, you may not abbreviate them. For
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
560 example, a diary entry for the Hebrew date Heshvan 25 could look like
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
561
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
562 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
563 HHeshvan 25 Happy Hebrew birthday!
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
564 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
565
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
566 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
567 and would appear in the diary for any date that corresponds to Heshvan 25
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
568 on the Hebrew calendar. Similarly, an Islamic-date diary entry might be
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
569
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
570 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
571 IDhu al-Qada 25 Happy Islamic birthday!
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
572 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
573
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
574 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
575 and would appear in the diary for any date that corresponds to Dhu al-Qada 25
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
576 on the Islamic calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
577
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
578 As with Gregorian-date diary entries, Hebrew- and Islamic-date entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
579 are nonmarking if they are preceded with an ampersand (@samp{&}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
580
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
581 There are commands to help you in making Hebrew- and Islamic-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
582 entries to your diary:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
583
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
584 @table @kbd
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
585 @item i h d
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
586 Add a diary entry for the Hebrew date corresponding to the selected date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
587 (@code{insert-hebrew-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
588 @item i h m
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
589 Add a diary entry for the day of the Hebrew month corresponding to the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
590 selected date (@code{insert-monthly-hebrew-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
591 @item i h y
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
592 Add a diary entry for the day of the Hebrew year corresponding to the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
593 selected date (@code{insert-yearly-hebrew-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
594 @item i i d
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
595 Add a diary entry for the Islamic date corresponding to the selected date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
596 (@code{insert-islamic-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
597 @item i i m
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
598 Add a diary entry for the day of the Islamic month corresponding to the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
599 selected date (@code{insert-monthly-islamic-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
600 @item i i y
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
601 Add a diary entry for the day of the Islamic year corresponding to the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
602 selected date (@code{insert-yearly-islamic-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
603 @end table
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
604
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
605 @findex insert-hebrew-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
606 @findex insert-monthly-hebrew-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
607 @findex insert-yearly-hebrew-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
608 @findex insert-islamic-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
609 @findex insert-monthly-islamic-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
610 @findex insert-yearly-islamic-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
611 These commands work exactly like the corresponding commands for ordinary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
612 diary entries: Move point to a date in the calendar window and the above
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
613 commands insert the Hebrew or Islamic date (corresponding to the date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
614 indicated by point) at the end of your diary file and you can then type the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
615 diary entry. If you want the diary entry to be nonmarking, give a numeric
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
616 argument to the command.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
617
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
618 @node Fancy Diary Display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
619 @section Fancy Diary Display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
620 @vindex diary-display-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
621 @findex simple-diary-display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
622
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
623 Diary display works by preparing the diary buffer and then running the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
624 hook @code{diary-display-hook}. The default value of this hook hides
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
625 the irrelevant diary entries and then displays the buffer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
626 (@code{simple-diary-display}). However, if you specify the hook as
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
627 follows,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
628
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
629 @cindex diary buffer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
630 @findex fancy-diary-display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
631 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
632 (add-hook 'diary-display-hook 'fancy-diary-display)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
633 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
634
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
635 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
636 then fancy mode displays diary entries and holidays by copying them into
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
637 a special buffer that exists only for display. Copying provides an
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
638 opportunity to change the displayed text to make it prettier---for
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
639 example, to sort the entries by the dates they apply to.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
640
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
641 As with simple diary display, you can print a hard copy of the buffer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
642 with @code{print-diary-entries}. To print a hard copy of a day-by-day
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
643 diary for a week by positioning point on Sunday of that week, type
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
644 @kbd{7 d} and then do @kbd{M-x print-diary-entries}. As usual, the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
645 inclusion of the holidays slows down the display slightly; you can speed
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
646 things up by setting the variable @code{holidays-in-diary-buffer} to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
647 @code{nil}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
648
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
649 @vindex diary-list-include-blanks
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
650 Ordinarily, the fancy diary buffer does not show days for which there are
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
651 no diary entries, even if that day is a holiday. If you want such days to be
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
652 shown in the fancy diary buffer, set the variable
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
653 @code{diary-list-include-blanks} to @code{t}.@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
654
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
655 @cindex sorting diary entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
656 If you use the fancy diary display, you can use the normal hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
657 @code{list-diary-entries-hook} to sort each day's diary entries by their
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
658 time of day. Add this line to your @file{.emacs} file:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
659
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
660 @findex sort-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
661 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
662 (add-hook 'list-diary-entries-hook 'sort-diary-entries)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
663 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
664
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
665 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
666 For each day, this sorts diary entries that begin with a recognizable
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
667 time of day according to their times. Diary entries without times come
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
668 first within each day.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
669
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
670 @node Included Diary Files
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
671 @section Included Diary Files
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
672
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
673 If you use the fancy diary display, you can have diary entries from other
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
674 files included with your own by an ``include'' mechanism. This facility makes
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
675 possible the sharing of common diary files among groups of users. Lines in
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
676 the diary file of this form:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
677
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
678 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
679 #include "@var{filename}"
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
680 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
681
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
682 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
683 includes the diary entries from the file @var{filename} in the fancy
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
684 diary buffer (because the ordinary diary buffer is just the buffer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
685 associated with your diary file, you cannot use the include mechanism
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
686 unless you use the fancy diary buffer). The include mechanism is
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
687 recursive, by the way, so that included files can include other files,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
688 and so on; you must be careful not to have a cycle of inclusions, of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
689 course. To enable the include facility, add lines as follows to your
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
690 @file{.emacs} file:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
691
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
692 @vindex list-diary-entries-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
693 @vindex mark-diary-entries-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
694 @findex include-other-diary-files
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
695 @findex mark-included-diary-files
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
696 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
697 (add-hook 'list-diary-entries-hook 'include-other-diary-files)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
698 (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
699 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
700
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
701 @node Sexp Diary Entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
702 @section Sexp Entries and the Fancy Diary Display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
703 @cindex sexp diary entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
704
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
705 Sexp diary entries allow you to do more than just have complicated
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
706 conditions under which a diary entry applies. If you use the fancy
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
707 diary display, sexp entries can generate the text of the entry depending
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
708 on the date itself. For example, an anniversary diary entry can insert
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
709 the number of years since the anniversary date into the text of the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
710 diary entry. Thus the @samp{%d} in this dairy entry:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
711
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
712 @findex diary-anniversary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
713 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
714 %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
715 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
716
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
717 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
718 gets replaced by the age, so on October 31, 1990 the entry appears in
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
719 the fancy diary buffer like this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
720
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
721 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
722 Arthur's birthday (42 years old)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
723 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
724
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
725 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
726 If the diary file instead contains this entry:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
727
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
728 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
729 %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
730 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
731
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
732 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
733 the entry in the fancy diary buffer for October 31, 1990 appears like this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
734
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
735 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
736 Arthur's 42nd birthday
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
737 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
738
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
739 Similarly, cyclic diary entries can interpolate the number of repetitions
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
740 that have occurred:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
741
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
742 @findex diary-cyclic
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
743 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
744 %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
745 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
746
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
747 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
748 looks like this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
749
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
750 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
751 Renew medication (5th time)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
752 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
753
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
754 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
755 in the fancy diary display on September 8, 1990.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
756
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
757 The generality of sexp diary entries lets you specify any diary entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
758 that you can describe algorithmically. Suppose you get paid on the 21st
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
759 of the month if it is a weekday, and to the Friday before if the 21st is
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
760 on a weekend. The diary entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
761
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
762 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
763 &%%(let ((dayname (calendar-day-of-week date))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
764 (day (car (cdr date))))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
765 (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
766 (and (memq day '(19 20)) (= dayname 5)))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
767 ) Pay check deposited
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
768 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
769
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
770 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
771 applies to just those dates. This example illustrates how the sexp can
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
772 depend on the variable @code{date}; this variable is a list (@var{month}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
773 @var{day} @var{year}) that gives the Gregorian date for which the diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
774 entries are being found. If the value of the expression is @code{t},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
775 the entry applies to that date. If the expression evaluates to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
776 @code{nil}, the entry does @emph{not} apply to that date.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
777
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
778 The following sexp diary entries take advantage of the ability (in the fancy
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
779 diary display) to concoct diary entries based on the date:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
780
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
781 @findex diary-sunrise-sunset
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
782 @findex diary-phases-of-moon
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
783 @findex diary-day-of-year
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
784 @findex diary-iso-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
785 @findex diary-julian-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
786 @findex diary-astro-day-number
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
787 @findex diary-hebrew-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
788 @findex diary-islamic-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
789 @findex diary-french-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
790 @findex diary-mayan-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
791 @table @code
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
792 @item %%(diary-sunrise-sunset)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
793 Make a diary entry for the local times of today's sunrise and sunset.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
794 @item %%(diary-phases-of-moon)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
795 Make a diary entry for the phases (quarters) of the moon.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
796 @item %%(diary-day-of-year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
797 Make a diary entry with today's day number in the current year and the number
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
798 of days remaining in the current year.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
799 @item %%(diary-iso-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
800 Make a diary entry with today's equivalent ISO commercial date.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
801 @item %%(diary-julian-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
802 Make a diary entry with today's equivalent date on the Julian calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
803 @item %%(diary-astro-day-number)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
804 Make a diary entry with today's equivalent astronomical (Julian) day number.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
805 @item %%(diary-hebrew-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
806 Make a diary entry with today's equivalent date on the Hebrew calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
807 @item %%(diary-islamic-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
808 Make a diary entry with today's equivalent date on the Islamic calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
809 @item %%(diary-french-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
810 Make a diary entry with today's equivalent date on the French Revolutionary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
811 calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
812 @item %%(diary-mayan-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
813 Make a diary entry with today's equivalent date on the Mayan calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
814 @end table
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
815
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
816 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
817 Thus including the diary entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
818
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
819 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
820 &%%(diary-hebrew-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
821 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
822
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
823 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
824 causes every day's diary display to contain the equivalent date on the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
825 Hebrew calendar, if you are using the fancy diary display. (With simple
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
826 diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
827 diary for any date, but does nothing particularly useful.)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
828
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
829 There are a number of other available sexp diary entries that are important
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
830 to those who follow the Hebrew calendar:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
831
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
832 @cindex rosh hodesh
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
833 @findex diary-rosh-hodesh
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
834 @cindex parasha, weekly
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
835 @findex diary-parasha
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
836 @cindex candle lighting times
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
837 @findex diary-sabbath-candles
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
838 @cindex omer count
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
839 @findex diary-omer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
840 @cindex yahrzeits
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
841 @findex diary-yahrzeit
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
842 @table @code
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
843 @item %%(diary-rosh-hodesh)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
844 Make a diary entry that tells the occurrence and ritual announcement of each
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
845 new Hebrew month.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
846 @item %%(diary-parasha)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
847 Make a Saturday diary entry that tells the weekly synagogue scripture reading.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
848 @item %%(diary-sabbath-candles)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
849 Make a Friday diary entry that tells the @emph{local time} of Sabbath
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
850 candle lighting.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
851 @item %%(diary-omer)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
852 Make a diary entry that gives the omer count, when appropriate.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
853 @item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
854 Make a diary entry marking the anniversary of a date of death. The date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
855 is the @emph{Gregorian} (civil) date of death. The diary entry appears
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
856 on the proper Hebrew calendar anniversary and on the day before. (In
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
857 the European style, the order of the parameters is changed to @var{day},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
858 @var{month}, @var{year}.)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
859 @end table
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
860
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
861 @node Appt Customizing
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
862 @section Customizing Appointment Reminders
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
863
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
864 You can specify exactly how Emacs reminds you of an appointment and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
865 how far in advance it begins doing so. Here are the variables that you
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
866 can set:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
867
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
868 @vindex appt-message-warning-time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
869 @vindex appt-audible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
870 @vindex appt-visible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
871 @vindex appt-display-mode-line
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
872 @vindex appt-msg-window
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
873 @vindex appt-display-duration
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
874 @table @code
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
875 @item appt-message-warning-time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
876 The time in minutes before an appointment that the reminder begins. The
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
877 default is 10 minutes.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
878 @item appt-audible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
879 If this is @code{t} (the default), Emacs rings the terminal bell for
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
880 appointment reminders.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
881 @item appt-visible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
882 If this is @code{t} (the default), Emacs displays the appointment
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
883 message in echo area.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
884 @item appt-display-mode-line
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
885 If this is @code{t} (the default), Emacs displays the number of minutes
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
886 to the appointment on the mode line.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
887 @item appt-msg-window
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
888 If this is @code{t} (the default), Emacs displays the appointment
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
889 message in another window.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
890 @item appt-display-duration
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
891 The number of seconds an appointment message is displayed. The default
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
892 is 5 seconds.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
893 @end table