From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Merziger Newsgroups: gmane.emacs.bugs Subject: bug#13536: 24.2; Patterns in `diary-european-date-forms' NOT mutually exclusive -- incl. suggested Fix Date: Wed, 23 Jan 2013 22:17:57 +0100 Message-ID: <874ni738fu.fsf@filista.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1358975874 32594 80.91.229.3 (23 Jan 2013 21:17:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 23 Jan 2013 21:17:54 +0000 (UTC) To: 13536@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 23 22:18:13 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ty7hz-0007ol-Rw for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Jan 2013 22:18:12 +0100 Original-Received: from localhost ([::1]:43046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty7hi-0003Co-Gt for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Jan 2013 16:17:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty7hd-0003Bx-CQ for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 16:17:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ty7ha-0006R1-BW for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 16:17:49 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty7ha-0006Qu-8u for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 16:17:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Ty7io-0000Ic-He for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 16:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Merziger Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Jan 2013 21:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13536 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13589759381135 (code B ref -1); Wed, 23 Jan 2013 21:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jan 2013 21:18:58 +0000 Original-Received: from localhost ([127.0.0.1]:46807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ty7ij-0000IF-Gv for submit@debbugs.gnu.org; Wed, 23 Jan 2013 16:18:58 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50490) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ty7ig-0000I7-OI for submit@debbugs.gnu.org; Wed, 23 Jan 2013 16:18:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ty7hO-0006Np-KJ for submit@debbugs.gnu.org; Wed, 23 Jan 2013 16:17:37 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:52618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty7hO-0006Nl-HG for submit@debbugs.gnu.org; Wed, 23 Jan 2013 16:17:34 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty7hL-00039z-Pv for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 16:17:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ty7hI-0006N5-DE for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 16:17:31 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:56430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ty7hI-0006Mr-3b for bug-gnu-emacs@gnu.org; Wed, 23 Jan 2013 16:17:28 -0500 Original-Received: from localhost (koln-4d0b5970.pool.mediaWays.net [77.11.89.112]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0LjdQ8-1UZfRN3M5I-00bPdY; Wed, 23 Jan 2013 22:17:26 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Provags-ID: V02:K0:6o9AXX675oynoduRP8h6cC5pBDzwsxr0hJjMYcoBeP2 vNhpF7TyIc5AIy5ha5l2JU6dcQ/k8ztz/TLeXsT22PT7gn9CQO NhWBGGMrBl9VLj8xmZEyJwC0v5/XZn5sqYG1CPCXQUPcQjV1IB 0eZV6QNsFVqR6+ckUPD5lKImFeGUcMJ6MDahnQ1QxT9Trel3rq zm8nIHX9OGQ1HqCRN0BQtHHYrsT4hGGX81NtsjqRWRQMBlUE7K P2zXohHXdgd1f8y/FTDFMKbq7hAR0rHhSwT1lbymf9O3bqwyRT 0ZzEsZzVWvsnnPQ2rZmPso+OdtWDWLIwtn69cvxCBINxRcn8ur eCD3+IPLmatQEQrI6MK8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70219 Archived-At: To reproduce the bug start with emacs -Q Contents of ~/diary are the following five lines: 23 Jan 10:00 Test-Entry 1 23 Jan 10pm Test-Entry 2 23 Jan 10am Test-Entry 3 23 Jan 10Pm Test-Entry 4 23 Jan 10Am Test-Entry 5 1.) Start the calendar: M-x calendar 2.) Set calendar-date-style to 'european M-x calendar-set-date-style Choose 'european. 3.) In *Calendar* - buffer go to date: January, 23 of year 10 4.) Type key `d' to show the diary for that date UNEXPECTEDLY, the buffer `Fancy Diary Entries' looks like this: Saturday, 23 January 10 ======================= 10:00 Test-Entry 1 10pm Test-Entry 2 10am Test-Entry 3 10Pm Test-Entry 4 10Am Test-Entry 5 00 Test-Entry 1 m Test-Entry 2 m Test-Entry 3 m Test-Entry 4 m Test-Entry 5 The first five line are the expected ones - the last five lines appear due to the fact, that the elements of the list `diary-european-date-forms' are NOT mutually exclusive, as they should as required by the documentation. --- End of Bug description --- SUGGESTED FIX: In File PATH-TO-EMACS/lisp/calendar/calendar.el do the following: (defcustom diary-european-date-forms '((day "/" month "[^/0-9]") (day "/" month "/" year "[^0-9]") (backup day " *" monthname"\\W+\\<\\([^*0-9]\\|\\([0-9]+[:aApP]\\)\\)") ;;-------------------------------------------------------------- ;; (day " *" monthname " *" year "[^0-9]") (not restrictive enough) (day " *" monthname " *" year "[^0-9:aApP]") ;; (suggested fix) ;;--------------------------------------^^^^^------------------- ;; Include letters a,A,p,P and colon here ;; (dayname "\\W")) "List of pseudo-patterns describing the European style of dates. The defaults are: DAY/MONTH; DAY/MONTH/YEAR; DAY MONTHNAME; DAY MONTHNAME YEAR; DAYNAME. Normally you should not customize this, but `diary-date-forms' (which see)." :type '(repeat (choice (cons :tag "Backup" :value (backup . nil) (const backup) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp)))) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp))))) :group 'diary) After this change I could not observe this unexpected behaviour anymore. COMMENT: This misbehaviour is not just a matter of sophistry. I'm trying to develop a contribution to emacs calendar/diary which allows a form of natural (automated) archiving of outdatet diary entries, this way trying to avoid that the diary file grows unnecessarily large over time. (Any hints, ideas, minimal requirements on this welcome :-)) Matching of diary entries is much harder, if these date-forms are NOT mutually exclusive. So please consider fixing that the suggested (or any other) way. Thanks in advance!