annotate lispref/calendar.texi @ 45832:4edf58a4abfc

*** empty log message ***
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 14 Jun 2002 16:29:11 +0000
parents d772d01c5650
children 01bd8c67a47a
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.
21007
66d807bdc5b4 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 20360
diff changeset
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1995, 1998 Free Software Foundation, Inc.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 @c See the file elisp.texi for copying conditions.
21682
90da2489c498 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 21007
diff changeset
5 @node Calendar, System Interface, Display, Top
6387
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.
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
19 * Fancy Diary Display:: Enhancing the diary display, sorting entries,
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
20 using included diary files.
6387
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
25875
6a17c48b52ef *** empty log message ***
Phillip Rulon <pjr@gnu.org>
parents: 25751
diff changeset
33 your init file:@refill
6387
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
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
41 this displays both the calendar and diary windows whenever you start Emacs.
6387
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
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
46 calendar automatically displays a list of holidays for the current
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
47 three-month period. The holiday list appears in a separate
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
48 window.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
50 @vindex mark-diary-entries-in-calendar
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
51 You can set the variable @code{mark-diary-entries-in-calendar} to
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
52 @code{t} in order to mark any dates with diary entries. This takes
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
53 effect whenever the calendar window contents are recomputed. There are
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
54 two ways of marking these dates: by changing the face (@pxref{Faces}),
26324
d772d01c5650 Patch from rms.
Gerd Moellmann <gerd@gnu.org>
parents: 25875
diff changeset
55 or by placing a plus sign (@samp{+}) beside the date.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 @vindex mark-holidays-in-calendar
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 Similarly, setting the variable @code{mark-holidays-in-calendar} to
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
59 @code{t} marks holiday dates, either with a change of face or with an
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
60 asterisk (@samp{*}).
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
61
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
62 @vindex calendar-holiday-marker
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
63 @vindex diary-entry-marker
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
64 The variable @code{calendar-holiday-marker} specifies how to mark a
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
65 date as being a holiday. Its value may be a character to insert next to
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
66 the date, or a face name to use for displaying the date. Likewise, the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
67 variable @code{diary-entry-marker} specifies how to mark a date that has
12067
73dc8205d259 *** empty log message ***
Karl Heuer <kwzh@gnu.org>
parents: 10906
diff changeset
68 diary entries. The calendar creates faces named @code{holiday-face} and
73dc8205d259 *** empty log message ***
Karl Heuer <kwzh@gnu.org>
parents: 10906
diff changeset
69 @code{diary-face} for these purposes; those symbols are the default
26324
d772d01c5650 Patch from rms.
Gerd Moellmann <gerd@gnu.org>
parents: 25875
diff changeset
70 values of these variables.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 @vindex calendar-load-hook
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
73 The variable @code{calendar-load-hook} is a normal hook run when the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
74 calendar package is first loaded (before actually starting to display
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
75 the calendar).
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 @vindex initial-calendar-window-hook
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
78 Starting the calendar runs the normal hook
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
79 @code{initial-calendar-window-hook}. Recomputation of the calendar
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
80 display does not run this hook. But if you leave the calendar with the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
81 @kbd{q} command and reenter it, the hook runs again.@refill
6387
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 @vindex today-visible-calendar-hook
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
84 The variable @code{today-visible-calendar-hook} is a normal hook run
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
85 after the calendar buffer has been prepared with the calendar when the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
86 current date is visible in the window. One use of this hook is to
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
87 replace today's date with asterisks; to do that, use the hook function
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
88 @code{calendar-star-date}.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 @findex calendar-star-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
91 @example
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
92 (add-hook 'today-visible-calendar-hook 'calendar-star-date)
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 @noindent
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
96 Another standard hook function marks the current date, either by
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
97 changing its face or by adding an asterisk. Here's how to use it:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 @findex calendar-mark-today
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 @example
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
101 (add-hook 'today-visible-calendar-hook 'calendar-mark-today)
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
102 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
104 @noindent
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
105 @vindex calendar-today-marker
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
106 The variable @code{calendar-today-marker} specifies how to mark today's
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
107 date. Its value should be a character to insert next to the date or a
12067
73dc8205d259 *** empty log message ***
Karl Heuer <kwzh@gnu.org>
parents: 10906
diff changeset
108 face name to use for displaying the date. A face named
73dc8205d259 *** empty log message ***
Karl Heuer <kwzh@gnu.org>
parents: 10906
diff changeset
109 @code{calendar-today-face} is provided for this purpose; that symbol is
26324
d772d01c5650 Patch from rms.
Gerd Moellmann <gerd@gnu.org>
parents: 25875
diff changeset
110 the default for this variable.
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
111
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
112 @vindex today-invisible-calendar-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
113 @noindent
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
114 A similar normal hook, @code{today-invisible-calendar-hook} is run if
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
115 the current date is @emph{not} visible in the window.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116
25751
467b88fab665 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 24862
diff changeset
117 @vindex calendar-move-hook
467b88fab665 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 24862
diff changeset
118 Starting in Emacs 21, each of the calendar cursor motion commands
467b88fab665 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 24862
diff changeset
119 runs the hook @code{calendar-move-hook} after it moves the cursor.
467b88fab665 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 24862
diff changeset
120
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 @node Holiday Customizing
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 @section Customizing the Holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 @vindex calendar-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 @vindex christian-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 @vindex hebrew-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 @vindex islamic-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128 Emacs knows about holidays defined by entries on one of several lists.
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
129 You can customize these lists of holidays to your own needs, adding or
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
130 deleting holidays. The lists of holidays that Emacs uses are for
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
131 general holidays (@code{general-holidays}), local holidays
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
132 (@code{local-holidays}), Christian holidays (@code{christian-holidays}),
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
133 Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Moslem)
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
134 holidays (@code{islamic-holidays}), and other holidays
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
135 (@code{other-holidays}).
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
137 @vindex general-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 The general holidays are, by default, holidays common throughout the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139 United States. To eliminate these holidays, set @code{general-holidays}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 to @code{nil}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
141
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142 @vindex local-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
143 There are no default local holidays (but sites may supply some). You
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 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
145 described below.
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 @vindex all-christian-calendar-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 @vindex all-hebrew-calendar-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 @vindex all-islamic-calendar-holidays
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
150 By default, Emacs does not include all the holidays of the religions
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
151 that it knows, only those commonly found in secular calendars. For a
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
152 more extensive collection of religious holidays, you can set any (or
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
153 all) of the variables @code{all-christian-calendar-holidays},
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154 @code{all-hebrew-calendar-holidays}, or
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 @code{all-islamic-calendar-holidays} to @code{t}. If you want to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 eliminate the religious holidays, set any or all of the corresponding
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157 variables @code{christian-holidays}, @code{hebrew-holidays}, and
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
158 @code{islamic-holidays} to @code{nil}.@refill
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 @vindex other-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
161 You can set the variable @code{other-holidays} to any list of
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
162 holidays. This list, normally empty, is intended for individual use.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 @cindex holiday forms
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 Each of the lists (@code{general-holidays}, @code{local-holidays},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166 @code{christian-holidays}, @code{hebrew-holidays},
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 @code{islamic-holidays}, and @code{other-holidays}) is a list of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
168 @dfn{holiday forms}, each holiday form describing a holiday (or
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
169 sometimes a list of holidays).
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
170
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
171 Here is a table of the possible kinds of holiday form. Day numbers
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
172 and month numbers count starting from 1, but ``dayname'' numbers
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
173 count Sunday as 0. The element @var{string} is always the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
174 name of the holiday, as a string.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176 @table @code
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177 @item (holiday-fixed @var{month} @var{day} @var{string})
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
178 A fixed date on the Gregorian calendar.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
180 @item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 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
182 (@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
183 from the end of the month.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 @item (holiday-hebrew @var{month} @var{day} @var{string})
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
186 A fixed date on the Hebrew calendar.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
187
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
188 @item (holiday-islamic @var{month} @var{day} @var{string})
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
189 A fixed date on the Islamic calendar.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
191 @item (holiday-julian @var{month} @var{day} @var{string})
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
192 A fixed date on the Julian calendar.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 @item (holiday-sexp @var{sexp} @var{string})
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
195 A date calculated by the Lisp expression @var{sexp}. The expression
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
196 should use the variable @code{year} to compute and return the date of a
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
197 holiday, or @code{nil} if the holiday doesn't happen this year. The
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
198 value of @var{sexp} must represent the date as a list of the form
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
199 @code{(@var{month} @var{day} @var{year})}.
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
200
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
201 @item (if @var{condition} @var{holiday-form})
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
202 A holiday that happens only if @var{condition} is true.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
204 @item (@var{function} @r{[}@var{args}@r{]})
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
205 A list of dates calculated by the function @var{function}, called with
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
206 arguments @var{args}.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
207 @end table
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
208
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
209 For example, suppose you want to add Bastille Day, celebrated in
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
210 France on July 14. You can do this as follows:
6387
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 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
213 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
216 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
218 fourteenth day of the seventh month (July).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220 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
221 of month. Here is a holiday form describing Hurricane Supplication Day,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222 celebrated in the Virgin Islands on the fourth Monday in August:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
224 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
225 (holiday-float 8 1 4 "Hurricane Supplication Day")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
227
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
229 Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230 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
231 the month (1 specifies the first occurrence, 2 the second occurrence,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 @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
233 so on).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
234
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
235 You can specify holidays that occur on fixed days of the Hebrew,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
236 Islamic, and Julian calendars too. For example,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
237
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
238 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 (setq other-holidays
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240 '((holiday-hebrew 10 2 "Last day of Hanukkah")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
241 (holiday-islamic 3 12 "Mohammed's Birthday")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242 (holiday-julian 4 2 "Jefferson's Birthday")))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
245 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
246 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
247 1 starting from Nisan), the Islamic feast celebrating Mohammed's
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 birthday (since the Islamic months are numbered from 1 starting with
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249 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
250 Julian calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
251
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
252 To include a holiday conditionally, use either Emacs Lisp's @code{if} or the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
253 @code{holiday-sexp} form. For example, American presidential elections
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
254 occur on the first Tuesday after the first Monday in November of years
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
255 divisible by 4:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
256
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
257 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
258 (holiday-sexp (if (= 0 (% year 4))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
259 (calendar-gregorian-from-absolute
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
260 (1+ (calendar-dayname-on-or-before
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
261 1 (+ 6 (calendar-absolute-from-gregorian
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
262 (list 11 1 year))))))
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
263 "US Presidential Election"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
264 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
265
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
266 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
267 or
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
268
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
269 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
270 (if (= 0 (% displayed-year 4))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 (fixed 11
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 (extract-calendar-day
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273 (calendar-gregorian-from-absolute
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 (1+ (calendar-dayname-on-or-before
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 1 (+ 6 (calendar-absolute-from-gregorian
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 (list 11 1 displayed-year)))))))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 "US Presidential Election"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280 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
281 calculations are involved in their determination. In such cases you
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
282 must write a Lisp function to do the calculation. To include eclipses,
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
283 for example, add @code{(eclipses)} to @code{other-holidays}
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
284 and write an Emacs Lisp function @code{eclipses} that returns a
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
285 (possibly empty) list of the relevant Gregorian dates among the range
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
286 visible in the calendar window, with descriptive strings, like this:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
287
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
288 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
289 (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
290 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
291
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292 @node Date Display Format
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 @section Date Display Format
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
294 @vindex calendar-date-display-form
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
295
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
296 You can customize the manner of displaying dates in the diary, in mode
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
297 lines, and in messages by setting @code{calendar-date-display-form}.
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
298 This variable holds a list of expressions that can involve the variables
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
299 @code{month}, @code{day}, and @code{year}, which are all numbers in
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
300 string form, and @code{monthname} and @code{dayname}, which are both
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
301 alphabetic strings. In the American style, the default value of this
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
302 list is as follows:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
303
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
304 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
305 ((if dayname (concat dayname ", ")) monthname " " day ", " year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
306 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
307
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
308 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
309 while in the European style this value is the default:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
310
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
311 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
312 ((if dayname (concat dayname ", ")) day " " monthname " " year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
313 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
314
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
315 @noindent
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
316 The ISO standard date representation is this:
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 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
319 (year "-" month "-" day)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
320 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
321
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
322 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
323 This specifies a typical American format:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
324
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
325 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
326 (month "/" day "/" (substring year -2))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
327 @end smallexample
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 @node Time Display Format
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
330 @section Time Display Format
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
331 @vindex calendar-time-display-form
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
332
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
333 The calendar and diary by default display times of day in the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
334 conventional American style with the hours from 1 through 12, minutes,
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
335 and either @samp{am} or @samp{pm}. If you prefer the European style,
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
336 also known in the US as military, in which the hours go from 00 to 23,
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
337 you can alter the variable @code{calendar-time-display-form}. This
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
338 variable is a list of expressions that can involve the variables
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
339 @code{12-hours}, @code{24-hours}, and @code{minutes}, which are all
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
340 numbers in string form, and @code{am-pm} and @code{time-zone}, which are
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
341 both alphabetic strings. The default value of
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
342 @code{calendar-time-display-form} is as follows:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
343
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
344 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
345 (12-hours ":" minutes am-pm
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
346 (if time-zone " (") time-zone (if time-zone ")"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
347 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
348
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
349 @noindent
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
350 Here is a value that provides European style times:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
351
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
352 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
353 (24-hours ":" minutes
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
354 (if time-zone " (") time-zone (if time-zone ")"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
355 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
356
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
357 @node Daylight Savings
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
358 @section Daylight Savings Time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
359 @cindex daylight savings time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
360
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
361 Emacs understands the difference between standard time and daylight
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
362 savings time---the times given for sunrise, sunset, solstices,
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
363 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
364 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
365 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
366 know which rules to use.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
367
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
368 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
369 where you are; on these systems, Emacs gets the information it needs
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
370 from the system automatically. If some or all of this information is
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
371 missing, Emacs fills in the gaps with the rules currently used in
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
372 Cambridge, Massachusetts, which is the center of GNU's world.
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
373
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
374
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
375 @vindex calendar-daylight-savings-starts
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
376 @vindex calendar-daylight-savings-ends
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
377 If the default choice of rules is not appropriate for your location,
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
378 you can tell Emacs the rules to use by setting the variables
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
379 @code{calendar-daylight-savings-starts} and
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
380 @code{calendar-daylight-savings-ends}. Their values should be Lisp
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
381 expressions that refer to the variable @code{year}, and evaluate to the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
382 Gregorian date on which daylight savings time starts or (respectively)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
383 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
384 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
385 savings time.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
386
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
387 Emacs uses these expressions to determine the start and end dates of
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
388 daylight savings time as holidays and for correcting times of day in the
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
389 solar and lunar calculations.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
390
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
391 The values for Cambridge, Massachusetts are as follows:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
392
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
393 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
394 @group
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
395 (calendar-nth-named-day 1 0 4 year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
396 (calendar-nth-named-day -1 0 10 year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
397 @end group
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
398 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
399
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
400 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
401 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
402 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
403 (October) of that year. If daylight savings time were
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
404 changed to start on October 1, you would set
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
405 @code{calendar-daylight-savings-starts} to this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
406
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
407 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
408 (list 10 1 year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
409 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
410
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
411 For a more complex example, suppose daylight savings time begins on
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
412 the first of Nisan on the Hebrew calendar. You should set
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
413 @code{calendar-daylight-savings-starts} to this value:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
414
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
415 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
416 (calendar-gregorian-from-absolute
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
417 (calendar-absolute-from-hebrew
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
418 (list 1 1 (+ year 3760))))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
419 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
420
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
421 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
422 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
423 year differs from the Gregorian year by 3760 at Nisan.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
424
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
425 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
426 all times in standard time, set @code{calendar-daylight-savings-starts}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
427 and @code{calendar-daylight-savings-ends} to @code{nil}.
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 calendar-daylight-time-offset
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
430 The variable @code{calendar-daylight-time-offset} specifies the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
431 difference between daylight savings time and standard time, measured in
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
432 minutes. The value for Cambridge is 60.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
433
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
434 @vindex calendar-daylight-savings-starts-time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
435 @vindex calendar-daylight-savings-ends-time
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
436 The variable @code{calendar-daylight-savings-starts-time} and the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
437 variable @code{calendar-daylight-savings-ends-time} specify the number
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
438 of minutes after midnight local time when the transition to and from
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
439 daylight savings time should occur. For Cambridge, both variables'
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
440 values are 120.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
441
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
442 @node Diary Customizing
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
443 @section Customizing the Diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
444
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
445 @vindex holidays-in-diary-buffer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
446 Ordinarily, the mode line of the diary buffer window indicates any
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
447 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
448 checking for holidays can take several seconds, so including holiday
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
449 information delays the display of the diary buffer noticeably. If you'd
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
450 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
451 holiday information, set the variable @code{holidays-in-diary-buffer} to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
452 @code{nil}.@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
453
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
454 @vindex number-of-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
455 The variable @code{number-of-diary-entries} controls the number of
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
456 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
457 initial display when @code{view-diary-entries-initially} is @code{t}, as
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
458 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
459 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
460 value is 2, both the current day's and the next day's entries are
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
461 displayed. The value can also be a vector of seven elements: for
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
462 example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
463 appear on Sunday, the current date's and the next day's diary entries
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
464 appear Monday through Thursday, Friday through Monday's entries appear
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
465 on Friday, while on Saturday only that day's entries appear.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
466
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
467 @vindex print-diary-entries-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
468 @findex print-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
469 The variable @code{print-diary-entries-hook} is a normal hook run
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
470 after preparation of a temporary buffer containing just the diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
471 entries currently visible in the diary buffer. (The other, irrelevant
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
472 diary entries are really absent from the temporary buffer; in the diary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
473 buffer, they are merely hidden.) The default value of this hook does
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
474 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
475 different command to do the printing, just change the value of this
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
476 hook. Other uses might include, for example, rearranging the lines into
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
477 order by day and time.
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 @vindex diary-date-forms
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
480 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
481 standard American nor European styles suits your needs, by setting the
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
482 variable @code{diary-date-forms}. This variable is a list of patterns
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
483 for recognizing a date. Each date pattern is a list whose elements may
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
484 be regular expressions (@pxref{Regular Expressions}) or the symbols
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
485 @code{month}, @code{day}, @code{year}, @code{monthname}, and
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
486 @code{dayname}. All these elements serve as patterns that match certain
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
487 kinds of text in the diary file. In order for the date pattern, as a
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
488 whole, to match, all of its elements must match consecutively.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
489
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
490 A regular expression in a date pattern matches in its usual fashion,
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
491 using the standard syntax table altered so that @samp{*} is a word
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
492 constituent.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
493
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
494 The symbols @code{month}, @code{day}, @code{year}, @code{monthname},
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
495 and @code{dayname} match the month number, day number, year number,
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
496 month name, and day name of the date being considered. The symbols that
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
497 match numbers allow leading zeros; those that match names allow
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
498 three-letter abbreviations and capitalization. All the symbols can
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
499 match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
500 month'', and so on, it should match regardless of the date being
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
501 considered.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
502
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
503 The default value of @code{diary-date-forms} in the American style is
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
504 this:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
505
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
506 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
507 ((month "/" day "[^/0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
508 (month "/" day "/" year "[^0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
509 (monthname " *" day "[^,0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
510 (monthname " *" day ", *" year "[^0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
511 (dayname "\\W"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
512 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
513
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
514 The date patterns in the list must be @emph{mutually exclusive} and
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
515 must not match any portion of the diary entry itself, just the date and
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
516 one character of whitespace. If, to be mutually exclusive, the pattern
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
517 must match a portion of the diary entry text---beyond the whitespace
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
518 that ends the date---then the first element of the date pattern
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
519 @emph{must} be @code{backup}. This causes the date recognizer to back
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
520 up to the beginning of the current word of the diary entry, after
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
521 finishing the match. Even if you use @code{backup}, the date pattern
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
522 must absolutely not match more than a portion of the first word of the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
523 diary entry. The default value of @code{diary-date-forms} in the
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
524 European style is this list:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
525
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
526 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
527 ((day "/" month "[^/0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
528 (day "/" month "/" year "[^0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
529 (backup day " *" monthname "\\W+\\<[^*0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
530 (day " *" monthname " *" year "[^0-9]")
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
531 (dayname "\\W"))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
532 @end example
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
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
535 Notice the use of @code{backup} in the third pattern, because it needs
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
536 to match part of a word beyond the date itself to distinguish it from
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
537 the fourth pattern.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
538
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
539 @node Hebrew/Islamic Entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
540 @section Hebrew- and Islamic-Date Diary Entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
541
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
542 Your diary file can have entries based on Hebrew or Islamic dates, as
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
543 well as entries based on the world-standard Gregorian calendar.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
544 However, because recognition of such entries is time-consuming and most
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
545 people don't use them, you must explicitly enable their use. If you
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
546 want the diary to recognize Hebrew-date diary entries, for example,
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
547 you must do this:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
548
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
549 @vindex nongregorian-diary-listing-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
550 @vindex nongregorian-diary-marking-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
551 @findex list-hebrew-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
552 @findex mark-hebrew-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
553 @smallexample
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
554 (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
555 (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
556 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
557
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
558 @noindent
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
559 If you want Islamic-date entries, do this:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
560
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
561 @findex list-islamic-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
562 @findex mark-islamic-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
563 @smallexample
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
564 (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
565 (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
566 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
567
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
568 Hebrew- and Islamic-date diary entries have the same formats as
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
569 Gregorian-date diary entries, except that @samp{H} precedes a Hebrew
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
570 date and @samp{I} precedes an Islamic date. Moreover, because the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
571 Hebrew and Islamic month names are not uniquely specified by the first
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
572 three letters, you may not abbreviate them. For example, a diary entry
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
573 for the Hebrew date Heshvan 25 could look like this:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
574
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
575 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
576 HHeshvan 25 Happy Hebrew birthday!
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
577 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
578
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
579 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
580 and would appear in the diary for any date that corresponds to Heshvan 25
22252
40089afa2b1d *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 21682
diff changeset
581 on the Hebrew calendar. And here is an Islamic-date diary entry that matches
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
582 Dhu al-Qada 25:
6387
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 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
585 IDhu al-Qada 25 Happy Islamic birthday!
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
586 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
587
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
588 As with Gregorian-date diary entries, Hebrew- and Islamic-date entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
589 are nonmarking if they are preceded with an ampersand (@samp{&}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
590
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
591 Here is a table of commands used in the calendar to create diary entries
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
592 that match the selected date and other dates that are similar in the Hebrew
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
593 or Islamic calendar:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
594
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
595 @table @kbd
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
596 @item i h d
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
597 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
598 (@code{insert-hebrew-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
599 @item i h m
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
600 Add a diary entry for the day of the Hebrew month corresponding to the
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
601 selected date (@code{insert-monthly-hebrew-diary-entry}). This diary
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
602 entry matches any date that has the same Hebrew day-within-month as the
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
603 selected date.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
604 @item i h y
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
605 Add a diary entry for the day of the Hebrew year corresponding to the
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
606 selected date (@code{insert-yearly-hebrew-diary-entry}). This diary
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
607 entry matches any date which has the same Hebrew month and day-within-month
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
608 as the selected date.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
609 @item i i d
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
610 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
611 (@code{insert-islamic-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
612 @item i i m
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
613 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
614 selected date (@code{insert-monthly-islamic-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
615 @item i i y
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
616 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
617 selected date (@code{insert-yearly-islamic-diary-entry}).
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
618 @end table
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
619
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
620 @findex insert-hebrew-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
621 @findex insert-monthly-hebrew-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
622 @findex insert-yearly-hebrew-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
623 @findex insert-islamic-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
624 @findex insert-monthly-islamic-diary-entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
625 @findex insert-yearly-islamic-diary-entry
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
626 These commands work much like the corresponding commands for ordinary
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
627 diary entries: they apply to the date that point is on in the calendar
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
628 window, and what they do is insert just the date portion of a diary entry
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
629 at the end of your diary file. You must then insert the rest of the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
630 diary entry.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
631
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
632 @node Fancy Diary Display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
633 @section Fancy Diary Display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
634 @vindex diary-display-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
635 @findex simple-diary-display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
636
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
637 Diary display works by preparing the diary buffer and then running the
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
638 hook @code{diary-display-hook}. The default value of this hook
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
639 (@code{simple-diary-display}) hides the irrelevant diary entries and
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
640 then displays the buffer. However, if you specify the hook as follows,
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
641
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
642 @cindex diary buffer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
643 @findex fancy-diary-display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
644 @example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
645 (add-hook 'diary-display-hook 'fancy-diary-display)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
646 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
647
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
648 @noindent
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
649 this enables fancy diary display. It displays diary entries and
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
650 holidays by copying them into a special buffer that exists only for the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
651 sake of display. Copying to a separate buffer provides an opportunity
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
652 to change the displayed text to make it prettier---for example, to sort
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
653 the entries by the dates they apply to.
6387
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 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
656 with @code{print-diary-entries}. To print a hard copy of a day-by-day
24862
78aaef52e28f *** empty log message ***
Karl Heuer <kwzh@gnu.org>
parents: 22252
diff changeset
657 diary for a week, position point on Sunday of that week, type
78aaef52e28f *** empty log message ***
Karl Heuer <kwzh@gnu.org>
parents: 22252
diff changeset
658 @kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
659 inclusion of the holidays slows down the display slightly; you can speed
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
660 things up by setting the variable @code{holidays-in-diary-buffer} to
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
661 @code{nil}.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
662
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
663 @vindex diary-list-include-blanks
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
664 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
665 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
666 shown in the fancy diary buffer, set the variable
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
667 @code{diary-list-include-blanks} to @code{t}.@refill
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
668
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
669 @cindex sorting diary entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
670 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
671 @code{list-diary-entries-hook} to sort each day's diary entries by their
22252
40089afa2b1d *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 21682
diff changeset
672 time of day. Here's how:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
673
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
674 @findex sort-diary-entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
675 @example
10906
7601ae23cf92 Fix sort-diary-entries example.
Richard M. Stallman <rms@gnu.org>
parents: 7688
diff changeset
676 (add-hook 'list-diary-entries-hook 'sort-diary-entries t)
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
677 @end example
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
678
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
679 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
680 For each day, this sorts diary entries that begin with a recognizable
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
681 time of day according to their times. Diary entries without times come
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
682 first within each day.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
683
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
684 Fancy diary display also has the ability to process included diary
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
685 files. This permits a group of people to share a diary file for events
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
686 that apply to all of them. Lines in the diary file of this form:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
687
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
688 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
689 #include "@var{filename}"
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
690 @end smallexample
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 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
693 includes the diary entries from the file @var{filename} in the fancy
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
694 diary buffer. The include mechanism is recursive, so that included files
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
695 can include other files, and so on; you must be careful not to have a
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
696 cycle of inclusions, of course. Here is how to enable the include
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
697 facility:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
698
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
699 @vindex list-diary-entries-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
700 @vindex mark-diary-entries-hook
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
701 @findex include-other-diary-files
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
702 @findex mark-included-diary-files
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
703 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
704 (add-hook 'list-diary-entries-hook 'include-other-diary-files)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
705 (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
706 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
707
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
708 The include mechanism works only with the fancy diary display, because
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
709 ordinary diary display shows the entries directly from your diary file.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
710
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
711 @node Sexp Diary Entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
712 @section Sexp Entries and the Fancy Diary Display
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
713 @cindex sexp diary entries
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
714
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
715 Sexp diary entries allow you to do more than just have complicated
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
716 conditions under which a diary entry applies. If you use the fancy
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
717 diary display, sexp entries can generate the text of the entry depending
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
718 on the date itself. For example, an anniversary diary entry can insert
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
719 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
720 diary entry. Thus the @samp{%d} in this dairy entry:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
721
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
722 @findex diary-anniversary
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
723 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
724 %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
725 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
726
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
727 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
728 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
729 the fancy diary buffer like this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
730
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
731 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
732 Arthur's birthday (42 years old)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
733 @end smallexample
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 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
736 If the diary file instead contains this entry:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
737
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
738 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
739 %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
740 @end smallexample
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 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
743 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
744
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
745 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
746 Arthur's 42nd birthday
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
747 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
748
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
749 Similarly, cyclic diary entries can interpolate the number of repetitions
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
750 that have occurred:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
751
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
752 @findex diary-cyclic
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
753 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
754 %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
755 @end smallexample
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 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
758 looks like this:
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
759
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
760 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
761 Renew medication (5th time)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
762 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
763
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
764 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
765 in the fancy diary display on September 8, 1990.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
766
20355
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
767 There is an early reminder diary sexp that includes its entry in the
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
768 diary not only on the date of occurrence, but also on earlier dates.
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
769 For example, if you want a reminder a week before your anniversary, you
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
770 can use
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
771
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
772 @findex diary-remind
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
773 @smallexample
21007
66d807bdc5b4 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 20360
diff changeset
774 %%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary
20355
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
775 @end smallexample
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
776
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
777 @noindent
20360
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
778 and the fancy diary will show
20355
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
779 @smallexample
25751
467b88fab665 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 24862
diff changeset
780 Ed's anniversary
20355
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
781 @end smallexample
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
782 @noindent
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
783 both on December 15 and on December 22.
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
784
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
785 @findex diary-date
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
786 The function @code{diary-date} applies to dates described by a month,
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
787 day, year combination, each of which can be an integer, a list of
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
788 integers, or @code{t}. The value @code{t} means all values. For
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
789 example,
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
790
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
791 @smallexample
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
792 %%(diary-date '(10 11 12) 22 t) Rake leaves
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
793 @end smallexample
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
794
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
795 @noindent
20360
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
796 causes the fancy diary to show
20355
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
797
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
798 @smallexample
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
799 Rake leaves
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
800 @end smallexample
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
801
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
802 @noindent
20360
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
803 on October 22, November 22, and December 22 of every year.
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
804
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
805 @findex diary-float
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
806 The function @code{diary-float} allows you to describe diary entries
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
807 that apply to dates like the third Friday of November, or the last
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
808 Tuesday in April. The parameters are the @var{month}, @var{dayname},
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
809 and an index @var{n}. The entry appears on the @var{n}th @var{dayname}
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
810 of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
811 so on. If @var{n} is negative it counts backward from the end of
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
812 @var{month}. The value of @var{month} can be a list of months, a single
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
813 month, or @code{t} to specify all months. You can also use an optional
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
814 parameter @var{day} to specify the @var{n}th @var{dayname} of
21007
66d807bdc5b4 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 20360
diff changeset
815 @var{month} on or after/before @var{day}; the value of @var{day} defaults
20360
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
816 to 1 if @var{n} is positive and to the last day of @var{month} if
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
817 @var{n} is negative. For example,
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
818
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
819 @smallexample
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
820 %%(diary-float t 1 -1) Pay rent
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
821 @end smallexample
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
822
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
823 @noindent
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
824 causes the fancy diary to show
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
825
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
826 @smallexample
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
827 Pay rent
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
828 @end smallexample
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
829
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
830 @noindent
1645cf890b24 Describe diary-float function.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 20355
diff changeset
831 on the last Monday of every month.
20355
41e0ec95fdef Describe diary-remind and diary-date.
Edward M. Reingold <reingold@emr.cs.iit.edu>
parents: 12067
diff changeset
832
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
833 The generality of sexp diary entries lets you specify any diary entry
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
834 that you can describe algorithmically. A sexp diary entry contains an
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
835 expression that computes whether the entry applies to any given date.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
836 If its value is non-@code{nil}, the entry applies to that date;
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
837 otherwise, it does not. The expression can use the variable @code{date}
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
838 to find the date being considered; its value is a list (@var{month}
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
839 @var{day} @var{year}) that refers to the Gregorian calendar.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
840
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
841 Suppose you get paid on the 21st of the month if it is a weekday, and
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
842 on the Friday before if the 21st is on a weekend. Here is how to write
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
843 a sexp diary entry that matches those dates:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
844
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
845 @smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
846 &%%(let ((dayname (calendar-day-of-week date))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
847 (day (car (cdr date))))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
848 (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
849 (and (memq day '(19 20)) (= dayname 5)))
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
850 ) Pay check deposited
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
851 @end smallexample
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
852
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
853 The following sexp diary entries take advantage of the ability (in the fancy
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
854 diary display) to concoct diary entries whose text varies based on the date:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
855
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
856 @findex diary-sunrise-sunset
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
857 @findex diary-phases-of-moon
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
858 @findex diary-day-of-year
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
859 @findex diary-iso-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
860 @findex diary-julian-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
861 @findex diary-astro-day-number
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
862 @findex diary-hebrew-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
863 @findex diary-islamic-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
864 @findex diary-french-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
865 @findex diary-mayan-date
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
866 @table @code
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
867 @item %%(diary-sunrise-sunset)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
868 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
869 @item %%(diary-phases-of-moon)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
870 Make a diary entry for the phases (quarters) of the moon.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
871 @item %%(diary-day-of-year)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
872 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
873 of days remaining in the current year.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
874 @item %%(diary-iso-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
875 Make a diary entry with today's equivalent ISO commercial date.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
876 @item %%(diary-julian-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
877 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
878 @item %%(diary-astro-day-number)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
879 Make a diary entry with today's equivalent astronomical (Julian) day number.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
880 @item %%(diary-hebrew-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
881 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
882 @item %%(diary-islamic-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
883 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
884 @item %%(diary-french-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
885 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
886 calendar.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
887 @item %%(diary-mayan-date)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
888 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
889 @end table
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
890
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
891 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
892 Thus including the diary entry
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
893
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
894 @example
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
895 &%%(diary-hebrew-date)
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
896 @end example
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
897
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
898 @noindent
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
899 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
900 Hebrew calendar, if you are using the fancy diary display. (With simple
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
901 diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
902 diary for any date, but does nothing particularly useful.)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
903
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
904 These functions can be used to construct sexp diary entries based on
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
905 the Hebrew calendar in certain standard ways:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
906
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
907 @cindex rosh hodesh
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
908 @findex diary-rosh-hodesh
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
909 @cindex parasha, weekly
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
910 @findex diary-parasha
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
911 @cindex candle lighting times
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
912 @findex diary-sabbath-candles
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
913 @cindex omer count
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
914 @findex diary-omer
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
915 @cindex yahrzeits
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
916 @findex diary-yahrzeit
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
917 @table @code
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
918 @item %%(diary-rosh-hodesh)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
919 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
920 new Hebrew month.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
921 @item %%(diary-parasha)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
922 Make a Saturday diary entry that tells the weekly synagogue scripture reading.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
923 @item %%(diary-sabbath-candles)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
924 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
925 candle lighting.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
926 @item %%(diary-omer)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
927 Make a diary entry that gives the omer count, when appropriate.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
928 @item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name}
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
929 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
930 is the @emph{Gregorian} (civil) date of death. The diary entry appears
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
931 on the proper Hebrew calendar anniversary and on the day before. (In
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
932 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
933 @var{month}, @var{year}.)
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
934 @end table
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
935
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
936 @node Appt Customizing
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
937 @section Customizing Appointment Reminders
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
938
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
939 You can specify exactly how Emacs reminds you of an appointment, and
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
940 how far in advance it begins doing so, by setting these variables:
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
941
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
942 @vindex appt-message-warning-time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
943 @vindex appt-audible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
944 @vindex appt-visible
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
945 @vindex appt-display-mode-line
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
946 @vindex appt-msg-window
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
947 @vindex appt-display-duration
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
948 @vindex appt-disp-window-function
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
949 @vindex appt-delete-window-function
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
950 @table @code
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
951 @item appt-message-warning-time
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
952 The time in minutes before an appointment that the reminder begins. The
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
953 default is 10 minutes.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
954 @item appt-audible
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
955 If this is non-@code{nil}, Emacs rings the
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
956 terminal bell for appointment reminders. The default is @code{t}.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
957 @item appt-visible
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
958 If this is non-@code{nil}, Emacs displays the appointment
7688
ab6b8aa5002e entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7401
diff changeset
959 message in the echo area. The default is @code{t}.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
960 @item appt-display-mode-line
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
961 If this is non-@code{nil}, Emacs displays the number of minutes
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
962 to the appointment on the mode line. The default is @code{t}.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
963 @item appt-msg-window
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
964 If this is non-@code{nil}, Emacs displays the appointment
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
965 message in another window. The default is @code{t}.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
966 @item appt-disp-window-function
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
967 This variable holds a function to use to create the other window
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
968 for the appointment message.
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
969 @item appt-delete-window-function
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
970 This variable holds a function to use to get rid of the appointment
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
971 message window, when its time is up.
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
972 @item appt-display-duration
7401
afe506bf7264 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 6387
diff changeset
973 The number of seconds to display an appointment message. The default
6387
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
974 is 5 seconds.
b06d5c68be5a Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
975 @end table