[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real u
From: |
Edward M. Reingold |
Subject: |
Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real update |
Date: |
07 Dec 2006 11:48:35 -0600 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
>>>>> "AH" == Alf-Ivar Holm <address@hidden> writes:
AH> (defun local-holiday-easter-etc () "List of dates related to Easter in
AH> Norway, as visible in calendar window." (if (and (> displayed-month
AH> 5)) nil;; Ash Wednesday, Good Friday, and Easter are not visible.
This a good example of why the wider window can cause erroneous results.
The test
(if (> displayed-month 5)
checks if the center of the 3 month window is beyond May, in which case (as
the comment from my code says!) Ash Wednesday, Good Friday, and Easter cannot
be visibible because they occur in Feb/Mar/Apr. But if the window is 5 months
wide, they could be visible and the command to list or highlight all holidays
will miss them.
Almost all of the non-trivial holidays/diary entries would suffer in the same
way, so rewriting the code properly to display a wider window means modifying
almost every holiday/diary function in some (usually non-obvious) way.
--
Professor Edward M. Reingold Email: address@hidden
Department of Computer Science Voice: (312) 567-3309
Illinois Institute of Technology Assistant: (312) 567-5152
Stuart Building Fax: (312) 567-5067
10 West 31st Street, Suite 236
Chicago, IL 60616-3729 U.S.A.
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, (continued)
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, Glenn Morris, 2006/12/01
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, Richard Stallman, 2006/12/02
- Calendar hack: Displaying ISO weeks, update for emacs 22, the real update, Alf-Ivar Holm, 2006/12/06
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real update, Edward M. Reingold, 2006/12/06
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real update, Alf-Ivar Holm, 2006/12/07
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real update,
Edward M. Reingold <=
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real update, Richard Stallman, 2006/12/08
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real update, Ed Reingold, 2006/12/08
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real update, Alf-Ivar Holm, 2006/12/08
- Re: Calendar hack: Displaying ISO weeks, update for emacs 22, the real update, Richard Stallman, 2006/12/07