GNU bug report logs - #7019
appointments and unsorted diary-entries-list

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sun, 12 Sep 2010 10:00:03 UTC

Severity: normal

Found in version 23.2

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Glenn Morris <rgm <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 7019 <at> debbugs.gnu.org
Subject: bug#7019: 23.2; [PATCH] fix bugs in diary/appt
Date: Mon, 13 Sep 2010 20:26:03 -0400
Leo wrote:

> The doc string of diary-list-entries says the return list is sorted,

Where does it say that? Oh, I guess you might mean:

  Returns a list of all relevant diary entries found, if any, in order
  by date.

Which is true unless include files are involved. Note it does not mean
that entries are also sorted by time of day. I don't think sorting by
default is the right solution. I might just mention in the docs that
if include files are used, the order will day order for the entries
from any given file, then by the order in which the include files were
processed. Some people might want it that way (eg not sorted by time
of day), and those who don't are probably aready using
diary-sort-entries. The fact that the entries are in day order is
really just a consequence of how the code is implemented, rather than
a deliberate choice.

> (add-hook 'diary-list-entries-hook 'diary-sort-entries) is not
> guaranteed to work unless that is the very last function to run.

OK, I think that should just be pointed out in the docs.
(The manual sort of does this without being explicit.)

> appt-make-list replies on sorted diary entries to work.

Looks like it relies on them being sorted in _day_ order, but not in
_time_ order within any given day. Again, this is true unless include
files are involved. I guess this is why nobody noticed till now. I'll
fix that somehow.




This bug report was last modified 14 years and 330 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.