aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/calendar.texi71
1 files changed, 36 insertions, 35 deletions
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index 93671364a88..92f5c919414 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -206,7 +206,7 @@ Move point to today's date (@code{calendar-goto-today}).
206 @kbd{g d} (@code{calendar-goto-date}) prompts for a year, a month, and a day 206 @kbd{g d} (@code{calendar-goto-date}) prompts for a year, a month, and a day
207of the month, and then moves to that date. Because the calendar includes all 207of the month, and then moves to that date. Because the calendar includes all
208dates from the beginning of the current era, you must type the year in its 208dates from the beginning of the current era, you must type the year in its
209entirety; that is, type @samp{1990}, not @samp{90}. 209entirety; that is, type @samp{2010}, not @samp{10}.
210 210
211@kindex g D @r{(Calendar mode)} 211@kindex g D @r{(Calendar mode)}
212@findex calendar-goto-day-of-year 212@findex calendar-goto-day-of-year
@@ -919,36 +919,11 @@ years, and then displays the list of yahrzeit dates.
919 919
920 The Emacs diary keeps track of appointments or other events on a daily 920 The Emacs diary keeps track of appointments or other events on a daily
921basis, in conjunction with the calendar. To use the diary feature, you 921basis, in conjunction with the calendar. To use the diary feature, you
922must first create a @dfn{diary file} containing a list of events and 922must first create a diary file containing a list of events and
923their dates. Then Emacs can automatically pick out and display the 923their dates. Then Emacs can automatically pick out and display the
924events for today, for the immediate future, or for any specified 924events for today, for the immediate future, or for any specified
925date. 925date.
926 926
927 The name of the diary file is specified by the variable
928@code{diary-file}. The default is @file{~/.emacs.d/diary}, though for
929compatibility with older versions Emacs will use @file{~/diary} if it
930exists. Here's an example showing what the file looks like:
931
932@example
93312/22/2012 Twentieth wedding anniversary!!
934&1/1. Happy New Year!
93510/22 Ruth's birthday.
936* 21, *: Payday
937Tuesday--weekly meeting with grad students at 10am
938 Supowit, Shen, Bitner, and Kapoor to attend.
9391/13/89 Friday the thirteenth!!
940&thu 4pm squash game with Lloyd.
941mar 16 Dad's birthday
942April 15, 2013 Income tax due.
943&* 15 time cards due.
944@end example
945
946@noindent
947This format is essentially the same as the one used by the separate
948@command{calendar} utility that is present on some Unix systems. This
949example uses extra spaces to align the event descriptions of most of
950the entries. Such formatting is purely a matter of taste.
951
952 Although you probably will start by creating a diary manually, Emacs 927 Although you probably will start by creating a diary manually, Emacs
953provides a number of commands to let you view, add, and change diary 928provides a number of commands to let you view, add, and change diary
954entries. 929entries.
@@ -1069,10 +1044,18 @@ diary-mail-entries}. A prefix argument specifies how many days
1069@vindex diary-file 1044@vindex diary-file
1070 Your @dfn{diary file} is a file that records events associated with 1045 Your @dfn{diary file} is a file that records events associated with
1071particular dates. The name of the diary file is specified by the 1046particular dates. The name of the diary file is specified by the
1072variable @code{diary-file}. The @code{calendar} utility program 1047variable @code{diary-file}. The default is @file{~/.emacs.d/diary},
1073supports a subset of the format allowed by the Emacs diary facilities, 1048though for compatibility with older versions Emacs will use
1074so you can use that utility to view the diary file, with reasonable 1049@file{~/diary} if it exists.
1075results aside from the entries it cannot understand. 1050@ignore
1051@c I don't think this is relevant any more. The utility doesn't seem
1052@c to be part of the default install on GNU/Linux machines these days.
1053@c When I tried it with my basic diary file, it just died with an error.
1054The @code{calendar} utility program supports a subset of the format
1055allowed by the Emacs diary facilities, so you can use that utility to
1056view the diary file, with reasonable results aside from the entries it
1057cannot understand.
1058@end ignore
1076 1059
1077 Each entry in the diary file describes one event and consists of one 1060 Each entry in the diary file describes one event and consists of one
1078or more lines. An entry always begins with a date specification at the 1061or more lines. An entry always begins with a date specification at the
@@ -1080,7 +1063,25 @@ left margin. The rest of the entry is simply text to describe the
1080event. If the entry has more than one line, then the lines after the 1063event. If the entry has more than one line, then the lines after the
1081first must begin with whitespace to indicate they continue a previous 1064first must begin with whitespace to indicate they continue a previous
1082entry. Lines that do not begin with valid dates and do not continue a 1065entry. Lines that do not begin with valid dates and do not continue a
1083preceding entry are ignored. 1066preceding entry are ignored. Here's an example:
1067
1068@example
106912/22/2015 Twentieth wedding anniversary!
1070&1/1. Happy New Year!
107110/22 Ruth's birthday.
1072* 21, *: Payday
1073Tuesday--weekly meeting with grad students at 10am
1074 Supowit, Shen, Bitner, and Kapoor to attend.
10751/13/89 Friday the thirteenth!!
1076&thu 4pm squash game with Lloyd.
1077mar 16 Dad's birthday
1078April 15, 2016 Income tax due.
1079&* 15 time cards due.
1080@end example
1081
1082@noindent
1083This example uses extra spaces to align the event descriptions of most
1084of the entries. Such formatting is purely a matter of taste.
1084 1085
1085 You can also use a format where the first line of a diary entry 1086 You can also use a format where the first line of a diary entry
1086consists only of the date or day name (with no following blanks or 1087consists only of the date or day name (with no following blanks or
@@ -1271,12 +1272,12 @@ entry. The entry looks like this:
1271 1272
1272@findex diary-anniversary 1273@findex diary-anniversary
1273@example 1274@example
1274%%(diary-anniversary 10 31 1948) Arthur's birthday 1275%%(diary-anniversary 10 31 1988) Arthur's birthday
1275@end example 1276@end example
1276 1277
1277@noindent 1278@noindent
1278This entry applies to October 31 in any year after 1948; @samp{10 31 1279This entry applies to October 31 in any year after 1988; @samp{10 31
12791948} specifies the date. (If you are using the European or ISO 12801988} specifies the date. (If you are using the European or ISO
1280calendar style, the input order of month, day and year is different.) 1281calendar style, the input order of month, day and year is different.)
1281The reason this expression requires a beginning year is that advanced 1282The reason this expression requires a beginning year is that advanced
1282diary functions can use it to calculate the number of elapsed years. 1283diary functions can use it to calculate the number of elapsed years.