comparison man/xemacs/calendar.texi @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
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 init file. And when 574 variables for your usual physical location in your @file{.emacs} file.
575 you install Emacs on a machine, you can create a @file{default.el} file 575 And when you install Emacs on a machine, you can create a
576 which sets them properly for the typical location of most users of that 576 @file{default.el} file which sets them properly for the typical location
577 machine. @xref{Init File}. 577 of most users of that 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 init file, this 1054 If you put @code{(diary)} in your @file{.emacs} 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. @xref{Init File}. The mode line of the displayed window 1056 enter Emacs. The mode line of the displayed window shows the date and
1057 shows the date and any holidays that fall on that date. 1057 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 init file:@refill 1406 your @file{.emacs} 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 1414 this displays both the calendar and diary windows whenever you start Emacs.
1415 Emacs. @xref{Init File}.
1416 1415
1417 @vindex view-calendar-holidays-initially 1416 @vindex view-calendar-holidays-initially
1418 Similarly, if you set the variable 1417 Similarly, if you set the variable
1419 @code{view-calendar-holidays-initially} to @code{t}, entering the 1418 @code{view-calendar-holidays-initially} to @code{t}, entering the
1420 calendar automatically displays a list of holidays for the current 1419 calendar automatically displays a list of holidays for the current
1584 arguments @var{args}. 1583 arguments @var{args}.
1585 @end table 1584 @end table
1586 1585
1587 For example, suppose you want to add Bastille Day, celebrated in 1586 For example, suppose you want to add Bastille Day, celebrated in
1588 France on July 14. You can do this by adding the following line 1587 France on July 14. You can do this by adding the following line
1589 to your init file: 1588 to your @file{.emacs} file:
1590 1589
1591 @smallexample 1590 @smallexample
1592 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day"))) 1591 (setq other-holidays '((holiday-fixed 7 14 "Bastille Day")))
1593 @end smallexample 1592 @end smallexample
1594
1595 @xref{Init File}.
1596 1593
1597 @noindent 1594 @noindent
1598 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the 1595 The holiday form @code{(holiday-fixed 7 14 "Bastille Day")} specifies the
1599 fourteenth day of the seventh month (July). 1596 fourteenth day of the seventh month (July).
1600 1597
2062 @code{diary-list-include-blanks} to @code{t}.@refill 2059 @code{diary-list-include-blanks} to @code{t}.@refill
2063 2060
2064 @cindex sorting diary entries 2061 @cindex sorting diary entries
2065 If you use the fancy diary display, you can use the normal hook 2062 If you use the fancy diary display, you can use the normal hook
2066 @code{list-diary-entries-hook} to sort each day's diary entries by their 2063 @code{list-diary-entries-hook} to sort each day's diary entries by their
2067 time of day. Add this line to your init file: 2064 time of day. Add this line to your @file{.emacs} file:
2068 2065
2069 @findex sort-diary-entries 2066 @findex sort-diary-entries
2070 @example 2067 @example
2071 (add-hook 'list-diary-entries-hook 'sort-diary-entries t) 2068 (add-hook 'list-diary-entries-hook 'sort-diary-entries t)
2072 @end example 2069 @end example
2073
2074 @xref{Init File}.
2075 2070
2076 @noindent 2071 @noindent
2077 For each day, this sorts diary entries that begin with a recognizable 2072 For each day, this sorts diary entries that begin with a recognizable
2078 time of day according to their times. Diary entries without times come 2073 time of day according to their times. Diary entries without times come
2079 first within each day. 2074 first within each day.