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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#53702: closed (27.1; diary does not display some entries in
 european style)
Date: Sun, 23 Feb 2025 05:39:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 23 Feb 2025 05:38:05 +0000
with message-id <CADwFkmkvPjkBXfcG8-8KDvVriRF4kToaDct=Lf4pSDRur7HWzA <at> mail.gmail.com>
and subject line Re: bug#53702: 27.1; diary does not display some entries in european style
has caused the debbugs.gnu.org bug report #53702,
regarding 27.1; diary does not display some entries in european style
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
53702: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53702
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Francesco Potortì <pot <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.1; diary does not display some entries in european style
Date: Tue, 01 Feb 2022 17:21:54 +0100
Diary entries are not parsed by M-x diary if:
- calendar-date-style is set to european (rather than american)
AND
- the date is written as "3 Feb" (rather than 3/2)
AND
- the time is written as "18.00" (rather than 18:00)

At least, this is what I have found by trial and error.  I looked at the code in appt.el and diary-lib.el but was not able to find the culprit...

To reproduce:

$ emacs -Q -nw --load=appt-bug.el

You will see that only two european entries are shown (t1 and t2).

Then exit Emacs, comment out the second line in appt-bug-el and rerun Emacs as above: you will see four american entries (t1, t2, t3, t4).


================ appt-bug.el
(setq diary-file "~/appt-bug-diary"
      calendar-date-style 'european
      )
(load-library "diary-lib")
(diary-list-entries (list 2 3 (decoded-time-year (decode-time))) 1)


================ appt-bug-diary
	-*-diary-*-

3 Feb	18:00 t1 works (european)

3/2	18.00 t2 works (european)

3 Feb	18.00 t3 does not work (european)

3 Feb
	18.00 t4 does not work (european)

Feb 3	18:00 t1 works (american)

2/3	18.00 t2 works (american)

Feb 3	18.00 t3 works (american)

Feb 3
	18.00 t4 works (american)


[Message part 3 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Francesco Potortì <pot <at> gnu.org>,
 53702-done <at> debbugs.gnu.org
Subject: Re: bug#53702: 27.1;
 diary does not display some entries in european style
Date: Sun, 23 Feb 2025 05:38:05 +0000
Version: 31.1

Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Michael Heerdegen <michael_heerdegen <at> web.de> writes:
>
>> did you have the chance to try if that patch (repeated below) fixes your
>> problem?
>
> This was half a year ago, but I see that Francesco wasn't in the CCs, so
> perhaps he never got the message?
>
> Francesco, can you try Michael's patch and see whether that fixes the
> problem?
>
>> I'm now a bit worried about this paragraph in
>> (info "(emacs) Appointments"):
>>
>> |    You can write times in am/pm style (with ‘12:00am’ standing for
>> | midnight and ‘12:00pm’ standing for noon), or 24-hour European/military
>> | style.  You need not be consistent; your diary file can have a mixture
>> | of the two styles.  Times must be at the beginning of diary entries if
>> | they are to be recognized.
>>
>> Military style is 1200 for 12:00am, right?  This definitely can't be
>> used everywhere when using the European style because lines get
>> ambiguous: for digits could mean a year - or a military time in a line
>> not specifying a year.  Should that paragraph be corrected?
>
> 12:00am (midnight) is the same as 00:00/24:00 in military style.

This patch fixes the bug here, so I installed it with a fixed up commit
message (commit 8b0043ffd60).  I'm therefore closing this bug report.


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.