Mercurial > emacs
comparison lispref/calendar.texi @ 46751:01bd8c67a47a
Explain values of sexp diary entries.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 30 Jul 2002 18:56:52 +0000 |
parents | d772d01c5650 |
children | 23a1cea22d13 |
comparison
equal
deleted
inserted
replaced
46750:514398573221 | 46751:01bd8c67a47a |
---|---|
828 @end smallexample | 828 @end smallexample |
829 | 829 |
830 @noindent | 830 @noindent |
831 on the last Monday of every month. | 831 on the last Monday of every month. |
832 | 832 |
833 The generality of sexp diary entries lets you specify any diary entry | 833 The generality of sexp diary entries lets you specify any diary |
834 that you can describe algorithmically. A sexp diary entry contains an | 834 entry that you can describe algorithmically. A sexp diary entry |
835 expression that computes whether the entry applies to any given date. | 835 contains an expression that computes whether the entry applies to any |
836 If its value is non-@code{nil}, the entry applies to that date; | 836 given date. If its value is non-@code{nil}, the entry applies to that |
837 otherwise, it does not. The expression can use the variable @code{date} | 837 date; otherwise, it does not. The expression can use the variable |
838 to find the date being considered; its value is a list (@var{month} | 838 @code{date} to find the date being considered; its value is a list |
839 @var{day} @var{year}) that refers to the Gregorian calendar. | 839 (@var{month} @var{day} @var{year}) that refers to the Gregorian |
840 calendar. | |
841 | |
842 The sexp diary entry applies to a date when the expression's value | |
843 is non-@code{nil}, but some values have more specific meanings. If | |
844 the value is a string, that string is a description of the event which | |
845 occurs on that date. The value can also have the form | |
846 @code{(@var{mark} . @var{string})}; then @var{mark} specifies how to | |
847 mark the date in the calendar, and @var{string} is the description of | |
848 the event. If @var{mark} is a single-character string, that character | |
849 appears next to the date in the calendar. If @var{mark} is a face | |
850 name, the date is displayed in that face. If @var{mark} is | |
851 @code{nil}, that specifies no particular highlighting for the date. | |
840 | 852 |
841 Suppose you get paid on the 21st of the month if it is a weekday, and | 853 Suppose you get paid on the 21st of the month if it is a weekday, and |
842 on the Friday before if the 21st is on a weekend. Here is how to write | 854 on the Friday before if the 21st is on a weekend. Here is how to write |
843 a sexp diary entry that matches those dates: | 855 a sexp diary entry that matches those dates: |
844 | 856 |
931 on the proper Hebrew calendar anniversary and on the day before. (In | 943 on the proper Hebrew calendar anniversary and on the day before. (In |
932 the European style, the order of the parameters is changed to @var{day}, | 944 the European style, the order of the parameters is changed to @var{day}, |
933 @var{month}, @var{year}.) | 945 @var{month}, @var{year}.) |
934 @end table | 946 @end table |
935 | 947 |
948 All the functions documented above take an optional argument | |
949 @var{mark} which specifies how to mark the date in the calendar display. | |
950 If one of these functions decides that it applies to a certain date, | |
951 it returns a value that contains @var{mark}. | |
952 | |
936 @node Appt Customizing | 953 @node Appt Customizing |
937 @section Customizing Appointment Reminders | 954 @section Customizing Appointment Reminders |
938 | 955 |
939 You can specify exactly how Emacs reminds you of an appointment, and | 956 You can specify exactly how Emacs reminds you of an appointment, and |
940 how far in advance it begins doing so, by setting these variables: | 957 how far in advance it begins doing so, by setting these variables: |