comparison man/xemacs/calendar.texi @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 3ecd8885ac67
children 1ccc32a20af4
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
569 your time zone. Emacs displays the times of sunrise and sunset 569 your time zone. Emacs displays the times of sunrise and sunset
570 @emph{corrected for daylight savings time}. @xref{Daylight Savings}, 570 @emph{corrected for daylight savings time}. @xref{Daylight Savings},
571 for how daylight savings time is determined. 571 for how daylight savings time is determined.
572 572
573 As a user, you might find it convenient to set the calendar location 573 As a user, you might find it convenient to set the calendar location
574 variables for your usual physical location in your @file{.emacs} file. 574 variables for your usual physical location in your init file. And when
575 And when you install Emacs on a machine, you can create a 575 you install Emacs on a machine, you can create a @file{default.el} file
576 @file{default.el} file which sets them properly for the typical location 576 which sets them properly for the typical location of most users of that
577 of most users of that machine. @xref{Init File}. 577 machine. @xref{Init File}.
578 578
579 @node Lunar Phases, Other Calendars, Sunrise/Sunset, Calendar/Diary 579 @node Lunar Phases, Other Calendars, Sunrise/Sunset, Calendar/Diary
580 @subsection Phases of the Moon 580 @subsection Phases of the Moon
581 @cindex phases of the moon 581 @cindex phases of the moon
582 @cindex moon, phases of 582 @cindex moon, phases of
1049 The command @kbd{M-x diary} displays the diary entries for the current 1049 The command @kbd{M-x diary} displays the diary entries for the current
1050 date, independently of the calendar display, and optionally for the next 1050 date, independently of the calendar display, and optionally for the next
1051 few days as well; the variable @code{number-of-diary-entries} specifies 1051 few days as well; the variable @code{number-of-diary-entries} specifies
1052 how many days to include (@pxref{Customization}). 1052 how many days to include (@pxref{Customization}).
1053 1053
1054 If you put @code{(diary)} in your @file{.emacs} file, this 1054 If you put @code{(diary)} in your init file, this
1055 automatically displays a window with the day's diary entries, when you 1055 automatically displays a window with the day's diary entries, when you
1056 enter Emacs. The mode line of the displayed window shows the date and 1056 enter Emacs. @xref{Init File}. The mode line of the displayed window
1057 any holidays that fall on that date. 1057 shows the date and any holidays that fall on that date.
1058 1058
1059 @findex diary-mail-entries 1059 @findex diary-mail-entries
1060 @vindex diary-mail-days 1060 @vindex diary-mail-days
1061 Many users like to receive notice of events in their diary as email. 1061 Many users like to receive notice of events in their diary as email.
1062 To send such mail to yourself, use the command @kbd{M-x 1062 To send such mail to yourself, use the command @kbd{M-x
1401 1401
1402 If you set the variable @code{view-diary-entries-initially} to 1402 If you set the variable @code{view-diary-entries-initially} to
1403 @code{t}, calling up the calendar automatically displays the diary 1403 @code{t}, calling up the calendar automatically displays the diary
1404 entries for the current date as well. The diary dates appear only if 1404 entries for the current date as well. The diary dates appear only if
1405 the current date is visible. If you add both of the following lines to 1405 the current date is visible. If you add both of the following lines to
1406 your @file{.emacs} file:@refill 1406 your init file:@refill
1407 1407
1408 @example 1408 @example
1409 (setq view-diary-entries-initially t) 1409 (setq view-diary-entries-initially t)
1410 (calendar) 1410 (calendar)
1411 @end example 1411 @end example
1412 1412
1413 @noindent 1413 @noindent
1414 this displays both the calendar and diary windows whenever you start Emacs. 1414 this displays both the calendar and diary windows whenever you start
1415 Emacs. @xref{Init File}.
1415 1416
1416 @vindex view-calendar-holidays-initially 1417 @vindex view-calendar-holidays-initially
1417 Similarly, if you set the variable 1418 Similarly, if you set the variable
1418 @code{view-calendar-holidays-initially} to @code{t}, entering the 1419 @code{view-calendar-holidays-initially} to @code{t}, entering the
1419 calendar automatically displays a list of holidays for the current 1420 calendar automatically displays a list of holidays for the current
1583 arguments @var{args}. 1584 arguments @var{args}.
1584 @end table 1585 @end table
1585 1586
1586 For example, suppose you want to add Bastille Day, celebrated in 1587 For example, suppose you want to add Bastille Day, celebrated in
1587 France on July 14. You can do this by adding the following line 1588 France on July 14. You can do this by adding the following line
1588 to your @file{.emacs} file: 1589 to your init file:
1589 1590
1590 @smallexample 1591 @smallexample
1591 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day"))) 1592 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
1592 @end smallexample 1593 @end smallexample
1594
1595 @xref{Init File}.
1593 1596
1594 @noindent 1597 @noindent
1595 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the 1598 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
1596 fourteenth day of the seventh month (July). 1599 fourteenth day of the seventh month (July).
1597 1600
2059 @code{diary-list-include-blanks} to @code{t}.@refill 2062 @code{diary-list-include-blanks} to @code{t}.@refill
2060 2063
2061 @cindex sorting diary entries 2064 @cindex sorting diary entries
2062 If you use the fancy diary display, you can use the normal hook 2065 If you use the fancy diary display, you can use the normal hook
2063 @code{list-diary-entries-hook} to sort each day's diary entries by their 2066 @code{list-diary-entries-hook} to sort each day's diary entries by their
2064 time of day. Add this line to your @file{.emacs} file: 2067 time of day. Add this line to your init file:
2065 2068
2066 @findex sort-diary-entries 2069 @findex sort-diary-entries
2067 @example 2070 @example
2068 (add-hook 'list-diary-entries-hook 'sort-diary-entries t) 2071 (add-hook 'list-diary-entries-hook 'sort-diary-entries t)
2069 @end example 2072 @end example
2073
2074 @xref{Init File}.
2070 2075
2071 @noindent 2076 @noindent
2072 For each day, this sorts diary entries that begin with a recognizable 2077 For each day, this sorts diary entries that begin with a recognizable
2073 time of day according to their times. Diary entries without times come 2078 time of day according to their times. Diary entries without times come
2074 first within each day. 2079 first within each day.