From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brian Adkins Newsgroups: gmane.emacs.help Subject: Re: Bug with diary-float ? Date: Fri, 25 Apr 2008 21:40:28 -0400 Organization: BellSouth Internet Group Message-ID: <8763u5gzqr.fsf@gmail.com> References: <873apakocu.fsf@gmail.com> <85skx9ils6.fsf@emr.cs.iit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209177637 3798 80.91.229.12 (26 Apr 2008 02:40:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Apr 2008 02:40:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 26 04:41:13 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JpaLg-0004EX-P8 for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Apr 2008 04:41:13 +0200 Original-Received: from localhost ([127.0.0.1]:55546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JpaL0-0005P0-Ji for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Apr 2008 22:40:30 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!bigfeed.bellsouth.net!bignumber.bellsouth.net!news.bellsouth.net!bignews9.bellsouth.net.POSTED!06376b86!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:6S77YNU0ju+MmEB7Kz1HSpZZcnw= Original-Lines: 51 Original-X-Complaints-To: abuse@bellsouth.net X-Abuse-Info: Please forward a copy of all headers for proper handling Original-X-Trace: okjdhlmeenidhihjdbdpiflmbcekedmfhojhikkbagflhcbolapgbpjadbfmiolllgfobbgplgdghngkonkcomkhodcncpnjdipoccifmainhjgpimpaeefjhkegmgenlafnijcjiknbfbgiafglmkdbpcfidnol Original-NNTP-Posting-Date: Fri, 25 Apr 2008 21:39:25 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:158185 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53549 Archived-At: reingold@emr.cs.iit.edu (Edward M. Reingold) writes: >>>>>> "BA" == Brian Adkins writes: > > BA> I have the following line in my diary file: %%(diary-float t 0 5) > BA> 09:30-10:00 The Event > > BA> It does correctly show the event for the 5th Sunday of months that > BA> have 5 Sundays, but it also shows on the 1st Sunday of a month > BA> following a month with only 4 Sundays :) Apparently the check to see > BA> if the computed day is still in the same month is missing or > BA> incorrect. > > BA> Is this a known bug? I looked at the code in diary-lib.el, but my > BA> newbie elisp skills are not up to the task - that is one big hairy > BA> function. > > A bug in the documentation. The documentation reads > > Floating diary entry--entry applies if date is the nth dayname of month. > Parameters are MONTH, DAYNAME, N. MONTH can be a list of months, the > constant t, or an integer. The constant t means all months. If N is > negative, count backward from the end of the month. > > An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY > > But it should really say > > Floating diary entry--entry applies if date is the nth dayname on or after > the first of month. Parameters are MONTH, DAYNAME, N. MONTH can be a list > of months, the constant t, or an integer. The constant t means all months. > If N is negative, count backward from the end of the month. > > An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY Huh? Are you saying that May 4, 2008 should count as a "5th Sunday of the month"? diary-float works as I'd expect for all cases where the date actually exists in the month e.g. 1st Wednesday, 3rd Wednesday, 2nd Saturday, etc. I think it's a bug in the function, not the documentation. > > -- > > Professor Edward M. Reingold Email: reingold@iit.edu > Department of Computer Science Voice: (312) 567-3309 > Illinois Institute of Technology Fax: (312) 567-5067 > Stuart Building, 228F > 10 West 31st Street > Chicago, IL 60616-3729 U.S.A.