annotate man/cal-xtra.texi @ 73905:efe611a754cc

(url-http-mark-connection-as-free, url-http-find-free-connection): Don't treat process with status `connect' as free. (url-http-async-sentinel): Request correct url.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 10 Nov 2006 17:09:01 +0000
parents a6e9a00b021b
children 3d45362f1d38
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70457
bdd0ac985d67 Add Copyright notices.
Eli Zaretskii <eliz@gnu.org>
parents: 70440
diff changeset
1 @c This is part of the Emacs manual.
bdd0ac985d67 Add Copyright notices.
Eli Zaretskii <eliz@gnu.org>
parents: 70440
diff changeset
2 @c Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
bdd0ac985d67 Add Copyright notices.
Eli Zaretskii <eliz@gnu.org>
parents: 70440
diff changeset
3 @c See file emacs.texi for copying conditions.
bdd0ac985d67 Add Copyright notices.
Eli Zaretskii <eliz@gnu.org>
parents: 70440
diff changeset
4 @c
70440
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
5 @c This file is included either in emacs-xtra.texi (when producing the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
6 @c printed version) or in the main Emacs manual (for the on-line version).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
7
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
8 @c Moved here from the Emacs Lisp Reference Manual, 2005-03-26.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
9 @node Advanced Calendar/Diary Usage
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
10 @section Customizing the Calendar and Diary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
11
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
12 There are many customizations that you can use to make the calendar and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
13 diary suit your personal tastes.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
14
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
15 @menu
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
16 * Calendar Customizing:: Defaults you can set.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
17 * Holiday Customizing:: Defining your own holidays.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
18 * Date Display Format:: Changing the format.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
19 * Time Display Format:: Changing the format.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
20 * Diary Customizing:: Defaults you can set.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
21 * Hebrew/Islamic Entries:: How to obtain them.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
22 * Fancy Diary Display:: Enhancing the diary display, sorting entries,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
23 using included diary files.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
24 * Sexp Diary Entries:: Fancy things you can do.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
25 @end menu
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
26
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
27 @node Calendar Customizing
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
28 @subsection Customizing the Calendar
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
29 @vindex calendar-holiday-marker
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
30 @vindex diary-entry-marker
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
31 The variable @code{calendar-holiday-marker} specifies how to mark a
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
32 date as being a holiday. Its value may be a single-character string
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
33 to insert next to the date, or a face name to use for displaying the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
34 date. Likewise, the variable @code{diary-entry-marker} specifies how
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
35 to mark a date that has diary entries. The calendar creates faces
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
36 named @code{holiday-face} and @code{diary-face} for these purposes;
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
37 those symbols are the default values of these variables.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
38
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
39 @vindex calendar-load-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
40 The variable @code{calendar-load-hook} is a normal hook run when the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
41 calendar package is first loaded (before actually starting to display
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
42 the calendar).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
43
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
44 @vindex initial-calendar-window-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
45 Starting the calendar runs the normal hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
46 @code{initial-calendar-window-hook}. Recomputation of the calendar
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
47 display does not run this hook. But if you leave the calendar with the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
48 @kbd{q} command and reenter it, the hook runs again.@refill
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
49
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
50 @vindex today-visible-calendar-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
51 The variable @code{today-visible-calendar-hook} is a normal hook run
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
52 after the calendar buffer has been prepared with the calendar when the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
53 current date is visible in the window. One use of this hook is to
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
54 replace today's date with asterisks; to do that, use the hook function
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
55 @code{calendar-star-date}.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
56
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
57 @findex calendar-star-date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
58 @example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
59 (add-hook 'today-visible-calendar-hook 'calendar-star-date)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
60 @end example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
61
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
62 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
63 Another standard hook function marks the current date, either by
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
64 changing its face or by adding an asterisk. Here's how to use it:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
65
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
66 @findex calendar-mark-today
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
67 @example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
68 (add-hook 'today-visible-calendar-hook 'calendar-mark-today)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
69 @end example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
70
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
71 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
72 @vindex calendar-today-marker
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
73 The variable @code{calendar-today-marker} specifies how to mark
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
74 today's date. Its value should be a single-character string to insert
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
75 next to the date or a face name to use for displaying the date. A
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
76 face named @code{calendar-today-face} is provided for this purpose;
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
77 that symbol is the default for this variable.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
78
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
79 @vindex today-invisible-calendar-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
80 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
81 A similar normal hook, @code{today-invisible-calendar-hook} is run if
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
82 the current date is @emph{not} visible in the window.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
83
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
84 @vindex calendar-move-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
85 Each of the calendar cursor motion commands runs the hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
86 @code{calendar-move-hook} after it moves the cursor.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
87
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
88 @node Holiday Customizing
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
89 @subsection Customizing the Holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
90
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
91 @vindex calendar-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
92 @vindex christian-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
93 @vindex hebrew-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
94 @vindex islamic-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
95 Emacs knows about holidays defined by entries on one of several lists.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
96 You can customize these lists of holidays to your own needs, adding or
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
97 deleting holidays. The lists of holidays that Emacs uses are for
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
98 general holidays (@code{general-holidays}), local holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
99 (@code{local-holidays}), Christian holidays (@code{christian-holidays}),
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
100 Hebrew (Jewish) holidays (@code{hebrew-holidays}), Islamic (Muslim)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
101 holidays (@code{islamic-holidays}), and other holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
102 (@code{other-holidays}).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
103
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
104 @vindex general-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
105 The general holidays are, by default, holidays common throughout the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
106 United States. To eliminate these holidays, set @code{general-holidays}
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
107 to @code{nil}.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
108
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
109 @vindex local-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
110 There are no default local holidays (but sites may supply some). You
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
111 can set the variable @code{local-holidays} to any list of holidays, as
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
112 described below.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
113
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
114 @vindex all-christian-calendar-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
115 @vindex all-hebrew-calendar-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
116 @vindex all-islamic-calendar-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
117 By default, Emacs does not include all the holidays of the religions
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
118 that it knows, only those commonly found in secular calendars. For a
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
119 more extensive collection of religious holidays, you can set any (or
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
120 all) of the variables @code{all-christian-calendar-holidays},
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
121 @code{all-hebrew-calendar-holidays}, or
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
122 @code{all-islamic-calendar-holidays} to @code{t}. If you want to
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
123 eliminate the religious holidays, set any or all of the corresponding
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
124 variables @code{christian-holidays}, @code{hebrew-holidays}, and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
125 @code{islamic-holidays} to @code{nil}.@refill
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
126
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
127 @vindex other-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
128 You can set the variable @code{other-holidays} to any list of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
129 holidays. This list, normally empty, is intended for individual use.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
130
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
131 @cindex holiday forms
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
132 Each of the lists (@code{general-holidays}, @code{local-holidays},
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
133 @code{christian-holidays}, @code{hebrew-holidays},
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
134 @code{islamic-holidays}, and @code{other-holidays}) is a list of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
135 @dfn{holiday forms}, each holiday form describing a holiday (or
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
136 sometimes a list of holidays).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
137
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
138 Here is a table of the possible kinds of holiday form. Day numbers
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
139 and month numbers count starting from 1, but ``dayname'' numbers
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
140 count Sunday as 0. The element @var{string} is always the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
141 name of the holiday, as a string.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
142
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
143 @table @code
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
144 @item (holiday-fixed @var{month} @var{day} @var{string})
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
145 A fixed date on the Gregorian calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
146
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
147 @item (holiday-float @var{month} @var{dayname} @var{k} @var{string})
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
148 The @var{k}th @var{dayname} in @var{month} on the Gregorian calendar
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
149 (@var{dayname}=0 for Sunday, and so on); negative @var{k} means count back
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
150 from the end of the month.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
151
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
152 @item (holiday-hebrew @var{month} @var{day} @var{string})
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
153 A fixed date on the Hebrew calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
154
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
155 @item (holiday-islamic @var{month} @var{day} @var{string})
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
156 A fixed date on the Islamic calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
157
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
158 @item (holiday-julian @var{month} @var{day} @var{string})
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
159 A fixed date on the Julian calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
160
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
161 @item (holiday-sexp @var{sexp} @var{string})
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
162 A date calculated by the Lisp expression @var{sexp}. The expression
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
163 should use the variable @code{year} to compute and return the date of a
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
164 holiday, or @code{nil} if the holiday doesn't happen this year. The
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
165 value of @var{sexp} must represent the date as a list of the form
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
166 @code{(@var{month} @var{day} @var{year})}.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
167
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
168 @item (if @var{condition} @var{holiday-form})
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
169 A holiday that happens only if @var{condition} is true.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
170
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
171 @item (@var{function} @r{[}@var{args}@r{]})
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
172 A list of dates calculated by the function @var{function}, called with
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
173 arguments @var{args}.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
174 @end table
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
175
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
176 For example, suppose you want to add Bastille Day, celebrated in
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
177 France on July 14. You can do this as follows:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
178
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
179 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
180 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
181 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
182
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
183 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
184 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
185 fourteenth day of the seventh month (July).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
186
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
187 Many holidays occur on a specific day of the week, at a specific time
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
188 of month. Here is a holiday form describing Hurricane Supplication Day,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
189 celebrated in the Virgin Islands on the fourth Monday in August:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
190
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
191 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
192 (holiday-float 8 1 4 "Hurricane Supplication Day")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
193 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
194
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
195 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
196 Here the 8 specifies August, the 1 specifies Monday (Sunday is 0,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
197 Tuesday is 2, and so on), and the 4 specifies the fourth occurrence in
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
198 the month (1 specifies the first occurrence, 2 the second occurrence,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
199 @minus{}1 the last occurrence, @minus{}2 the second-to-last occurrence, and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
200 so on).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
201
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
202 You can specify holidays that occur on fixed days of the Hebrew,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
203 Islamic, and Julian calendars too. For example,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
204
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
205 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
206 (setq other-holidays
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
207 '((holiday-hebrew 10 2 "Last day of Hanukkah")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
208 (holiday-islamic 3 12 "Mohammed's Birthday")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
209 (holiday-julian 4 2 "Jefferson's Birthday")))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
210 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
211
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
212 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
213 adds the last day of Hanukkah (since the Hebrew months are numbered with
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
214 1 starting from Nisan), the Islamic feast celebrating Mohammed's
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
215 birthday (since the Islamic months are numbered from 1 starting with
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
216 Muharram), and Thomas Jefferson's birthday, which is 2 April 1743 on the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
217 Julian calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
218
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
219 To include a holiday conditionally, use either Emacs Lisp's @code{if} or the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
220 @code{holiday-sexp} form. For example, American presidential elections
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
221 occur on the first Tuesday after the first Monday in November of years
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
222 divisible by 4:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
223
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
224 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
225 (holiday-sexp '(if (= 0 (% year 4))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
226 (calendar-gregorian-from-absolute
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
227 (1+ (calendar-dayname-on-or-before
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
228 1 (+ 6 (calendar-absolute-from-gregorian
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
229 (list 11 1 year)))))))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
230 "US Presidential Election")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
231 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
232
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
233 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
234 or
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
235
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
236 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
237 (if (= 0 (% displayed-year 4))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
238 (fixed 11
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
239 (extract-calendar-day
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
240 (calendar-gregorian-from-absolute
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
241 (1+ (calendar-dayname-on-or-before
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
242 1 (+ 6 (calendar-absolute-from-gregorian
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
243 (list 11 1 displayed-year)))))))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
244 "US Presidential Election"))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
245 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
246
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
247 Some holidays just don't fit into any of these forms because special
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
248 calculations are involved in their determination. In such cases you
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
249 must write a Lisp function to do the calculation. To include eclipses,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
250 for example, add @code{(eclipses)} to @code{other-holidays}
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
251 and write an Emacs Lisp function @code{eclipses} that returns a
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
252 (possibly empty) list of the relevant Gregorian dates among the range
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
253 visible in the calendar window, with descriptive strings, like this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
254
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
255 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
256 (((6 27 1991) "Lunar Eclipse") ((7 11 1991) "Solar Eclipse") ... )
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
257 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
258
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
259 @node Date Display Format
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
260 @subsection Date Display Format
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
261 @vindex calendar-date-display-form
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
262
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
263 You can customize the manner of displaying dates in the diary, in mode
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
264 lines, and in messages by setting @code{calendar-date-display-form}.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
265 This variable holds a list of expressions that can involve the variables
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
266 @code{month}, @code{day}, and @code{year}, which are all numbers in
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
267 string form, and @code{monthname} and @code{dayname}, which are both
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
268 alphabetic strings. In the American style, the default value of this
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
269 list is as follows:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
270
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
271 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
272 ((if dayname (concat dayname ", ")) monthname " " day ", " year)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
273 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
274
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
275 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
276 while in the European style this value is the default:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
277
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
278 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
279 ((if dayname (concat dayname ", ")) day " " monthname " " year)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
280 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
281
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
282 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
283 The ISO standard date representation is this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
284
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
285 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
286 (year "-" month "-" day)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
287 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
288
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
289 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
290 This specifies a typical American format:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
291
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
292 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
293 (month "/" day "/" (substring year -2))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
294 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
295
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
296 @node Time Display Format
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
297 @subsection Time Display Format
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
298 @vindex calendar-time-display-form
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
299
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
300 The calendar and diary by default display times of day in the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
301 conventional American style with the hours from 1 through 12, minutes,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
302 and either @samp{am} or @samp{pm}. If you prefer the European style,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
303 also known in the US as military, in which the hours go from 00 to 23,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
304 you can alter the variable @code{calendar-time-display-form}. This
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
305 variable is a list of expressions that can involve the variables
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
306 @code{12-hours}, @code{24-hours}, and @code{minutes}, which are all
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
307 numbers in string form, and @code{am-pm} and @code{time-zone}, which are
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
308 both alphabetic strings. The default value of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
309 @code{calendar-time-display-form} is as follows:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
310
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
311 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
312 (12-hours ":" minutes am-pm
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
313 (if time-zone " (") time-zone (if time-zone ")"))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
314 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
315
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
316 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
317 Here is a value that provides European style times:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
318
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
319 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
320 (24-hours ":" minutes
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
321 (if time-zone " (") time-zone (if time-zone ")"))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
322 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
323
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
324 @node Diary Customizing
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
325 @subsection Customizing the Diary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
326
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
327 @vindex holidays-in-diary-buffer
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
328 Ordinarily, the mode line of the diary buffer window indicates any
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
329 holidays that fall on the date of the diary entries. The process of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
330 checking for holidays can take several seconds, so including holiday
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
331 information delays the display of the diary buffer noticeably. If you'd
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
332 prefer to have a faster display of the diary buffer but without the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
333 holiday information, set the variable @code{holidays-in-diary-buffer} to
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
334 @code{nil}.@refill
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
335
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
336 @vindex number-of-diary-entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
337 The variable @code{number-of-diary-entries} controls the number of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
338 days of diary entries to be displayed at one time. It affects the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
339 initial display when @code{view-diary-entries-initially} is @code{t}, as
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
340 well as the command @kbd{M-x diary}. For example, the default value is
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
341 1, which says to display only the current day's diary entries. If the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
342 value is 2, both the current day's and the next day's entries are
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
343 displayed. The value can also be a vector of seven elements: for
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
344 example, if the value is @code{[0 2 2 2 2 4 1]} then no diary entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
345 appear on Sunday, the current date's and the next day's diary entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
346 appear Monday through Thursday, Friday through Monday's entries appear
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
347 on Friday, while on Saturday only that day's entries appear.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
348
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
349 @vindex print-diary-entries-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
350 @findex print-diary-entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
351 The variable @code{print-diary-entries-hook} is a normal hook run
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
352 after preparation of a temporary buffer containing just the diary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
353 entries currently visible in the diary buffer. (The other, irrelevant
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
354 diary entries are really absent from the temporary buffer; in the diary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
355 buffer, they are merely hidden.) The default value of this hook does
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
356 the printing with the command @code{lpr-buffer}. If you want to use a
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
357 different command to do the printing, just change the value of this
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
358 hook. Other uses might include, for example, rearranging the lines into
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
359 order by day and time.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
360
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
361 @vindex diary-date-forms
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
362 You can customize the form of dates in your diary file, if neither the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
363 standard American nor European styles suits your needs, by setting the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
364 variable @code{diary-date-forms}. This variable is a list of patterns
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
365 for recognizing a date. Each date pattern is a list whose elements may
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
366 be regular expressions (@pxref{Regular Expressions,,, elisp, the Emacs
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
367 Lisp Reference Manual}) or the symbols @code{month}, @code{day},
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
368 @code{year}, @code{monthname}, and @code{dayname}. All these elements
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
369 serve as patterns that match certain kinds of text in the diary file.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
370 In order for the date pattern, as a whole, to match, all of its elements
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
371 must match consecutively.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
372
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
373 A regular expression in a date pattern matches in its usual fashion,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
374 using the standard syntax table altered so that @samp{*} is a word
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
375 constituent.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
376
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
377 The symbols @code{month}, @code{day}, @code{year}, @code{monthname},
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
378 and @code{dayname} match the month number, day number, year number,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
379 month name, and day name of the date being considered. The symbols that
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
380 match numbers allow leading zeros; those that match names allow
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
381 three-letter abbreviations and capitalization. All the symbols can
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
382 match @samp{*}; since @samp{*} in a diary entry means ``any day'', ``any
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
383 month'', and so on, it should match regardless of the date being
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
384 considered.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
385
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
386 The default value of @code{diary-date-forms} in the American style is
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
387 this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
388
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
389 @example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
390 ((month "/" day "[^/0-9]")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
391 (month "/" day "/" year "[^0-9]")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
392 (monthname " *" day "[^,0-9]")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
393 (monthname " *" day ", *" year "[^0-9]")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
394 (dayname "\\W"))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
395 @end example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
396
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
397 The date patterns in the list must be @emph{mutually exclusive} and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
398 must not match any portion of the diary entry itself, just the date and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
399 one character of whitespace. If, to be mutually exclusive, the pattern
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
400 must match a portion of the diary entry text---beyond the whitespace
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
401 that ends the date---then the first element of the date pattern
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
402 @emph{must} be @code{backup}. This causes the date recognizer to back
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
403 up to the beginning of the current word of the diary entry, after
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
404 finishing the match. Even if you use @code{backup}, the date pattern
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
405 must absolutely not match more than a portion of the first word of the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
406 diary entry. The default value of @code{diary-date-forms} in the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
407 European style is this list:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
408
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
409 @example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
410 ((day "/" month "[^/0-9]")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
411 (day "/" month "/" year "[^0-9]")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
412 (backup day " *" monthname "\\W+\\<[^*0-9]")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
413 (day " *" monthname " *" year "[^0-9]")
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
414 (dayname "\\W"))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
415 @end example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
416
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
417 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
418 Notice the use of @code{backup} in the third pattern, because it needs
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
419 to match part of a word beyond the date itself to distinguish it from
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
420 the fourth pattern.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
421
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
422 @node Hebrew/Islamic Entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
423 @subsection Hebrew- and Islamic-Date Diary Entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
424
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
425 Your diary file can have entries based on Hebrew or Islamic dates, as
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
426 well as entries based on the world-standard Gregorian calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
427 However, because recognition of such entries is time-consuming and most
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
428 people don't use them, you must explicitly enable their use. If you
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
429 want the diary to recognize Hebrew-date diary entries, for example,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
430 you must do this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
431
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
432 @vindex nongregorian-diary-listing-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
433 @vindex nongregorian-diary-marking-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
434 @findex list-hebrew-diary-entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
435 @findex mark-hebrew-diary-entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
436 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
437 (add-hook 'nongregorian-diary-listing-hook 'list-hebrew-diary-entries)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
438 (add-hook 'nongregorian-diary-marking-hook 'mark-hebrew-diary-entries)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
439 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
440
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
441 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
442 If you want Islamic-date entries, do this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
443
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
444 @findex list-islamic-diary-entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
445 @findex mark-islamic-diary-entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
446 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
447 (add-hook 'nongregorian-diary-listing-hook 'list-islamic-diary-entries)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
448 (add-hook 'nongregorian-diary-marking-hook 'mark-islamic-diary-entries)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
449 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
450
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
451 Hebrew- and Islamic-date diary entries have the same formats as
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
452 Gregorian-date diary entries, except that @samp{H} precedes a Hebrew
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
453 date and @samp{I} precedes an Islamic date. Moreover, because the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
454 Hebrew and Islamic month names are not uniquely specified by the first
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
455 three letters, you may not abbreviate them. For example, a diary entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
456 for the Hebrew date Heshvan 25 could look like this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
457
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
458 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
459 HHeshvan 25 Happy Hebrew birthday!
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
460 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
461
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
462 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
463 and would appear in the diary for any date that corresponds to Heshvan 25
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
464 on the Hebrew calendar. And here is an Islamic-date diary entry that matches
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
465 Dhu al-Qada 25:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
466
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
467 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
468 IDhu al-Qada 25 Happy Islamic birthday!
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
469 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
470
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
471 As with Gregorian-date diary entries, Hebrew- and Islamic-date entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
472 are nonmarking if they are preceded with an ampersand (@samp{&}).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
473
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
474 Here is a table of commands used in the calendar to create diary entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
475 that match the selected date and other dates that are similar in the Hebrew
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
476 or Islamic calendar:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
477
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
478 @table @kbd
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
479 @item i h d
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
480 Add a diary entry for the Hebrew date corresponding to the selected date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
481 (@code{insert-hebrew-diary-entry}).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
482 @item i h m
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
483 Add a diary entry for the day of the Hebrew month corresponding to the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
484 selected date (@code{insert-monthly-hebrew-diary-entry}). This diary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
485 entry matches any date that has the same Hebrew day-within-month as the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
486 selected date.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
487 @item i h y
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
488 Add a diary entry for the day of the Hebrew year corresponding to the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
489 selected date (@code{insert-yearly-hebrew-diary-entry}). This diary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
490 entry matches any date which has the same Hebrew month and day-within-month
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
491 as the selected date.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
492 @item i i d
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
493 Add a diary entry for the Islamic date corresponding to the selected date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
494 (@code{insert-islamic-diary-entry}).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
495 @item i i m
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
496 Add a diary entry for the day of the Islamic month corresponding to the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
497 selected date (@code{insert-monthly-islamic-diary-entry}).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
498 @item i i y
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
499 Add a diary entry for the day of the Islamic year corresponding to the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
500 selected date (@code{insert-yearly-islamic-diary-entry}).
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
501 @end table
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
502
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
503 @findex insert-hebrew-diary-entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
504 @findex insert-monthly-hebrew-diary-entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
505 @findex insert-yearly-hebrew-diary-entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
506 @findex insert-islamic-diary-entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
507 @findex insert-monthly-islamic-diary-entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
508 @findex insert-yearly-islamic-diary-entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
509 These commands work much like the corresponding commands for ordinary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
510 diary entries: they apply to the date that point is on in the calendar
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
511 window, and what they do is insert just the date portion of a diary entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
512 at the end of your diary file. You must then insert the rest of the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
513 diary entry.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
514
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
515 @node Fancy Diary Display
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
516 @subsection Fancy Diary Display
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
517 @vindex diary-display-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
518 @findex simple-diary-display
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
519
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
520 Diary display works by preparing the diary buffer and then running the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
521 hook @code{diary-display-hook}. The default value of this hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
522 (@code{simple-diary-display}) hides the irrelevant diary entries and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
523 then displays the buffer. However, if you specify the hook as follows,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
524
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
525 @cindex diary buffer
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
526 @findex fancy-diary-display
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
527 @example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
528 (add-hook 'diary-display-hook 'fancy-diary-display)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
529 @end example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
530
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
531 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
532 this enables fancy diary display. It displays diary entries and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
533 holidays by copying them into a special buffer that exists only for the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
534 sake of display. Copying to a separate buffer provides an opportunity
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
535 to change the displayed text to make it prettier---for example, to sort
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
536 the entries by the dates they apply to.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
537
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
538 As with simple diary display, you can print a hard copy of the buffer
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
539 with @code{print-diary-entries}. To print a hard copy of a day-by-day
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
540 diary for a week, position point on Sunday of that week, type
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
541 @kbd{7 d}, and then do @kbd{M-x print-diary-entries}. As usual, the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
542 inclusion of the holidays slows down the display slightly; you can speed
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
543 things up by setting the variable @code{holidays-in-diary-buffer} to
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
544 @code{nil}.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
545
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
546 @vindex diary-list-include-blanks
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
547 Ordinarily, the fancy diary buffer does not show days for which there are
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
548 no diary entries, even if that day is a holiday. If you want such days to be
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
549 shown in the fancy diary buffer, set the variable
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
550 @code{diary-list-include-blanks} to @code{t}.@refill
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
551
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
552 @cindex sorting diary entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
553 If you use the fancy diary display, you can use the normal hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
554 @code{list-diary-entries-hook} to sort each day's diary entries by their
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
555 time of day. Here's how:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
556
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
557 @findex sort-diary-entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
558 @example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
559 (add-hook 'list-diary-entries-hook 'sort-diary-entries t)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
560 @end example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
561
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
562 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
563 For each day, this sorts diary entries that begin with a recognizable
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
564 time of day according to their times. Diary entries without times come
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
565 first within each day.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
566
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
567 Fancy diary display also has the ability to process included diary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
568 files. This permits a group of people to share a diary file for events
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
569 that apply to all of them. Lines in the diary file of this form:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
570
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
571 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
572 #include "@var{filename}"
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
573 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
574
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
575 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
576 includes the diary entries from the file @var{filename} in the fancy
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
577 diary buffer. The include mechanism is recursive, so that included files
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
578 can include other files, and so on; you must be careful not to have a
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
579 cycle of inclusions, of course. Here is how to enable the include
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
580 facility:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
581
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
582 @vindex list-diary-entries-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
583 @vindex mark-diary-entries-hook
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
584 @findex include-other-diary-files
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
585 @findex mark-included-diary-files
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
586 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
587 (add-hook 'list-diary-entries-hook 'include-other-diary-files)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
588 (add-hook 'mark-diary-entries-hook 'mark-included-diary-files)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
589 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
590
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
591 The include mechanism works only with the fancy diary display, because
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
592 ordinary diary display shows the entries directly from your diary file.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
593
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
594 @node Sexp Diary Entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
595 @subsection Sexp Entries and the Fancy Diary Display
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
596 @cindex sexp diary entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
597
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
598 Sexp diary entries allow you to do more than just have complicated
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
599 conditions under which a diary entry applies. If you use the fancy
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
600 diary display, sexp entries can generate the text of the entry depending
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
601 on the date itself. For example, an anniversary diary entry can insert
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
602 the number of years since the anniversary date into the text of the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
603 diary entry. Thus the @samp{%d} in this dairy entry:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
604
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
605 @findex diary-anniversary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
606 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
607 %%(diary-anniversary 10 31 1948) Arthur's birthday (%d years old)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
608 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
609
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
610 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
611 gets replaced by the age, so on October 31, 1990 the entry appears in
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
612 the fancy diary buffer like this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
613
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
614 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
615 Arthur's birthday (42 years old)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
616 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
617
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
618 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
619 If the diary file instead contains this entry:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
620
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
621 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
622 %%(diary-anniversary 10 31 1948) Arthur's %d%s birthday
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
623 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
624
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
625 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
626 the entry in the fancy diary buffer for October 31, 1990 appears like this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
627
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
628 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
629 Arthur's 42nd birthday
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
630 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
631
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
632 Similarly, cyclic diary entries can interpolate the number of repetitions
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
633 that have occurred:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
634
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
635 @findex diary-cyclic
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
636 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
637 %%(diary-cyclic 50 1 1 1990) Renew medication (%d%s time)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
638 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
639
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
640 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
641 looks like this:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
642
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
643 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
644 Renew medication (5th time)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
645 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
646
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
647 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
648 in the fancy diary display on September 8, 1990.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
649
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
650 There is an early reminder diary sexp that includes its entry in the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
651 diary not only on the date of occurrence, but also on earlier dates.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
652 For example, if you want a reminder a week before your anniversary, you
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
653 can use
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
654
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
655 @findex diary-remind
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
656 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
657 %%(diary-remind '(diary-anniversary 12 22 1968) 7) Ed's anniversary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
658 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
659
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
660 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
661 and the fancy diary will show
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
662 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
663 Ed's anniversary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
664 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
665 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
666 both on December 15 and on December 22.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
667
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
668 @findex diary-date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
669 The function @code{diary-date} applies to dates described by a month,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
670 day, year combination, each of which can be an integer, a list of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
671 integers, or @code{t}. The value @code{t} means all values. For
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
672 example,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
673
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
674 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
675 %%(diary-date '(10 11 12) 22 t) Rake leaves
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
676 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
677
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
678 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
679 causes the fancy diary to show
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
680
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
681 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
682 Rake leaves
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
683 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
684
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
685 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
686 on October 22, November 22, and December 22 of every year.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
687
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
688 @findex diary-float
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
689 The function @code{diary-float} allows you to describe diary entries
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
690 that apply to dates like the third Friday of November, or the last
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
691 Tuesday in April. The parameters are the @var{month}, @var{dayname},
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
692 and an index @var{n}. The entry appears on the @var{n}th @var{dayname}
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
693 of @var{month}, where @var{dayname}=0 means Sunday, 1 means Monday, and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
694 so on. If @var{n} is negative it counts backward from the end of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
695 @var{month}. The value of @var{month} can be a list of months, a single
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
696 month, or @code{t} to specify all months. You can also use an optional
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
697 parameter @var{day} to specify the @var{n}th @var{dayname} of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
698 @var{month} on or after/before @var{day}; the value of @var{day} defaults
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
699 to 1 if @var{n} is positive and to the last day of @var{month} if
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
700 @var{n} is negative. For example,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
701
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
702 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
703 %%(diary-float t 1 -1) Pay rent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
704 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
705
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
706 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
707 causes the fancy diary to show
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
708
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
709 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
710 Pay rent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
711 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
712
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
713 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
714 on the last Monday of every month.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
715
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
716 The generality of sexp diary entries lets you specify any diary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
717 entry that you can describe algorithmically. A sexp diary entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
718 contains an expression that computes whether the entry applies to any
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
719 given date. If its value is non-@code{nil}, the entry applies to that
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
720 date; otherwise, it does not. The expression can use the variable
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
721 @code{date} to find the date being considered; its value is a list
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
722 (@var{month} @var{day} @var{year}) that refers to the Gregorian
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
723 calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
724
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
725 The sexp diary entry applies to a date when the expression's value
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
726 is non-@code{nil}, but some values have more specific meanings. If
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
727 the value is a string, that string is a description of the event which
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
728 occurs on that date. The value can also have the form
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
729 @code{(@var{mark} . @var{string})}; then @var{mark} specifies how to
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
730 mark the date in the calendar, and @var{string} is the description of
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
731 the event. If @var{mark} is a single-character string, that character
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
732 appears next to the date in the calendar. If @var{mark} is a face
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
733 name, the date is displayed in that face. If @var{mark} is
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
734 @code{nil}, that specifies no particular highlighting for the date.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
735
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
736 Suppose you get paid on the 21st of the month if it is a weekday, and
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
737 on the Friday before if the 21st is on a weekend. Here is how to write
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
738 a sexp diary entry that matches those dates:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
739
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
740 @smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
741 &%%(let ((dayname (calendar-day-of-week date))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
742 (day (car (cdr date))))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
743 (or (and (= day 21) (memq dayname '(1 2 3 4 5)))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
744 (and (memq day '(19 20)) (= dayname 5)))
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
745 ) Pay check deposited
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
746 @end smallexample
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
747
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
748 The following sexp diary entries take advantage of the ability (in the fancy
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
749 diary display) to concoct diary entries whose text varies based on the date:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
750
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
751 @findex diary-sunrise-sunset
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
752 @findex diary-phases-of-moon
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
753 @findex diary-day-of-year
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
754 @findex diary-iso-date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
755 @findex diary-julian-date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
756 @findex diary-astro-day-number
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
757 @findex diary-hebrew-date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
758 @findex diary-islamic-date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
759 @findex diary-french-date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
760 @findex diary-mayan-date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
761 @table @code
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
762 @item %%(diary-sunrise-sunset)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
763 Make a diary entry for the local times of today's sunrise and sunset.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
764 @item %%(diary-phases-of-moon)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
765 Make a diary entry for the phases (quarters) of the moon.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
766 @item %%(diary-day-of-year)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
767 Make a diary entry with today's day number in the current year and the number
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
768 of days remaining in the current year.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
769 @item %%(diary-iso-date)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
770 Make a diary entry with today's equivalent ISO commercial date.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
771 @item %%(diary-julian-date)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
772 Make a diary entry with today's equivalent date on the Julian calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
773 @item %%(diary-astro-day-number)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
774 Make a diary entry with today's equivalent astronomical (Julian) day number.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
775 @item %%(diary-hebrew-date)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
776 Make a diary entry with today's equivalent date on the Hebrew calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
777 @item %%(diary-islamic-date)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
778 Make a diary entry with today's equivalent date on the Islamic calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
779 @item %%(diary-french-date)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
780 Make a diary entry with today's equivalent date on the French Revolutionary
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
781 calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
782 @item %%(diary-mayan-date)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
783 Make a diary entry with today's equivalent date on the Mayan calendar.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
784 @end table
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
785
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
786 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
787 Thus including the diary entry
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
788
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
789 @example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
790 &%%(diary-hebrew-date)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
791 @end example
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
792
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
793 @noindent
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
794 causes every day's diary display to contain the equivalent date on the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
795 Hebrew calendar, if you are using the fancy diary display. (With simple
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
796 diary display, the line @samp{&%%(diary-hebrew-date)} appears in the
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
797 diary for any date, but does nothing particularly useful.)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
798
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
799 These functions can be used to construct sexp diary entries based on
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
800 the Hebrew calendar in certain standard ways:
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
801
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
802 @cindex rosh hodesh
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
803 @findex diary-rosh-hodesh
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
804 @cindex parasha, weekly
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
805 @findex diary-parasha
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
806 @cindex candle lighting times
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
807 @findex diary-sabbath-candles
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
808 @cindex omer count
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
809 @findex diary-omer
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
810 @cindex yahrzeits
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
811 @findex diary-yahrzeit
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
812 @table @code
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
813 @item %%(diary-rosh-hodesh)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
814 Make a diary entry that tells the occurrence and ritual announcement of each
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
815 new Hebrew month.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
816 @item %%(diary-parasha)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
817 Make a Saturday diary entry that tells the weekly synagogue scripture reading.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
818 @item %%(diary-sabbath-candles)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
819 Make a Friday diary entry that tells the @emph{local time} of Sabbath
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
820 candle lighting.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
821 @item %%(diary-omer)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
822 Make a diary entry that gives the omer count, when appropriate.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
823 @item %%(diary-yahrzeit @var{month} @var{day} @var{year}) @var{name}
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
824 Make a diary entry marking the anniversary of a date of death. The date
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
825 is the @emph{Gregorian} (civil) date of death. The diary entry appears
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
826 on the proper Hebrew calendar anniversary and on the day before. (In
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
827 the European style, the order of the parameters is changed to @var{day},
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
828 @var{month}, @var{year}.)
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
829 @end table
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
830
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
831 All the functions documented above take an optional argument
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
832 @var{mark} which specifies how to mark the date in the calendar display.
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
833 If one of these functions decides that it applies to a certain date,
5e1c038e4afa New file, a portion of emacs-xtra.texi.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
834 it returns a value that contains @var{mark}.
70461
a6e9a00b021b Add arch tagline
Miles Bader <miles@gnu.org>
parents: 70457
diff changeset
835
a6e9a00b021b Add arch tagline
Miles Bader <miles@gnu.org>
parents: 70457
diff changeset
836 @ignore
a6e9a00b021b Add arch tagline
Miles Bader <miles@gnu.org>
parents: 70457
diff changeset
837 arch-tag: 52cb299f-fd1f-4616-bfe6-91b988669431
a6e9a00b021b Add arch tagline
Miles Bader <miles@gnu.org>
parents: 70457
diff changeset
838 @end ignore