Subject: bug#53702: closed (Re: bug#53702: 27.1; diary does not display some entries in european style)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 23 Feb 2025 05:39:02 +0000

Your bug report

#53702: 27.1; diary does not display some entries in european style

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
53702: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53702
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#53702: 27.1; diary does not display some entries in european style
From: Stefan Kangas <[email-masked]>
To: Lars Ingebrigtsen <[email-masked]>, Michael Heerdegen <[email-masked]>
Cc: Francesco Potortì <[email-masked]>, [email-masked]
Date: Sun, 23 Feb 2025 05:38:05 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 31.1

Lars Ingebrigtsen <[email-masked]> writes:

> Michael Heerdegen <[email-masked]> 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.

Subject: 27.1; diary does not display some entries in european style
From: Francesco Potortì <[email-masked]>
To: [email-masked]
Date: Tue, 01 Feb 2022 17:21:54 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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)