From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.bugs Subject: bug#7019: 23.2; [PATCH] fix bugs in diary/appt Date: Tue, 14 Sep 2010 07:42:50 +0100 Message-ID: References: <2939td5fxg.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1284448251 19295 80.91.229.12 (14 Sep 2010 07:10:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Sep 2010 07:10:51 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 14 09:10:49 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OvPfC-0001mz-R9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Sep 2010 09:10:47 +0200 Original-Received: from localhost ([127.0.0.1]:40142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvPfB-0005TT-VY for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Sep 2010 03:10:46 -0400 Original-Received: from [140.186.70.92] (port=49574 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvPex-0005Ro-Ra for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 03:10:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvPew-00049h-L9 for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 03:10:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54343) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvPew-00049c-JM for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 03:10:30 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OvPCP-0002mH-MV; Tue, 14 Sep 2010 02:41:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Sep 2010 06:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7019 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by submit@debbugs.gnu.org id=B.128444645310670 (code B ref -1); Tue, 14 Sep 2010 06:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Sep 2010 06:40:53 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvPCG-0002m3-78 for submit@debbugs.gnu.org; Tue, 14 Sep 2010 02:40:52 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvPCD-0002lw-QV for submit@debbugs.gnu.org; Tue, 14 Sep 2010 02:40:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvPEM-0001GR-Q5 for submit@debbugs.gnu.org; Tue, 14 Sep 2010 02:43:03 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:34190) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvPEM-0001GN-Nh for submit@debbugs.gnu.org; Tue, 14 Sep 2010 02:43:02 -0400 Original-Received: from [140.186.70.92] (port=45166 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvPEL-0007qr-C3 for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 02:43:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvPEK-0001Fx-64 for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 02:43:01 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:52258) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvPEJ-0001Fi-Q8 for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 02:43:00 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OvPEI-0001OS-Au for bug-gnu-emacs@gnu.org; Tue, 14 Sep 2010 08:42:58 +0200 Original-Received: from cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com ([86.9.122.85]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Sep 2010 08:42:58 +0200 Original-Received: from sdl.web by cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Sep 2010 08:42:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0 b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/ xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4 G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (Mac OS X 10.6.4) Cancel-Lock: sha1:HzWjHskYPrJk3p7kqooSoxvpKcM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 14 Sep 2010 02:41:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40153 Archived-At: On 2010-09-14 01:26 +0100, Glenn Morris wrote: > 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. Sorry I should be more explicit. I meant date order in all of them. I think emacs should try its best not to miss any appointments recorded in it. For example, diary-list-entries-hook is user level variable, so anything could happen to it, say someone accidentally adds a function that shuffles diary-entry-list and that could screw up appt. Thanks. Leo