GNU bug report logs - #53702
27.1; diary does not display some entries in european style

Previous Next

Package: emacs;

Reported by: Francesco Potortì <pot <at> gnu.org>

Date: Tue, 1 Feb 2022 16:23:01 UTC

Severity: normal

Tags: patch

Found in version 27.1

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 53702 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Francesco Potortì <pot <at> gnu.org>
Cc: 53702 <at> debbugs.gnu.org
Subject: Re: bug#53702: 27.1; diary does not display some entries in
 european style
Date: Wed, 02 Feb 2022 01:39:22 +0100
[Message part 1 (text/plain, inline)]
Francesco Potortì <pot <at> gnu.org> writes:

> (setq diary-file "~/appt-bug-diary"
>       calendar-date-style 'european
>       )

The recipe should better call the function `calendar-set-date-style'
because "setting this variable [calendar-date-style] directly does not
take effect (if the calendar package is already loaded).

But that doesn't prevent the issue - the report is valid nonetheless.
One already sees in the diary file that the problematic lines are not
fontified.

The manual describes that different time formats can be mixed, and

  3 Feb	18.00 t3 does not work (european)

is not invalid AFAIU (`diary-entry-time': "A period (.) can be used
instead of a colon (:) to separate the hour and minute parts.").

The problem is actually that the date part is rejected because the time
format is not recognized by `diary-european-date-forms'.  This seems to
fix it:

[0001-WIP-Try-to-fix-53702.patch (text/x-diff, inline)]
From 07a072db84ec722e4e77d02c4d6aa77cafc19354 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Wed, 2 Feb 2022 01:08:43 +0100
Subject: [PATCH] WIP: Try to fix #53702

---
 lisp/calendar/calendar.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 48d308afad..d578d1a251 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -800,7 +800,7 @@ diary-american-date-forms
 (defcustom diary-european-date-forms
   '((day "/" month "[^/0-9]")
     (day "/" month "/" year "[^0-9]")
-    (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|\\([0-9]+[:aApP]\\)\\)")
+    (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|\\([0-9]+[:.aApP]\\)\\)")
     (day " *" monthname " *" year "[^0-9:aApP]")
     (dayname "\\W"))
   "List of pseudo-patterns describing the European style of dates.
--
2.30.2

[Message part 3 (text/plain, inline)]
See also Bug#13536 which touched that definition.

We must be sure that the entries of `diary-european-date-forms' are
still mutually exclusive.  `year' never contains a dot "." (that regexp
is built in `diary-list-entries-2'), so I guess we are save... right?

Michael.

This bug report was last modified 89 days ago.

Previous Next


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