From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Francesco Potortì" <pot@gnu.org>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, 53702@debbugs.gnu.org
Subject: bug#53702: 27.1; diary does not display some entries in european style
Date: Thu, 08 Sep 2022 15:45:19 +0200 [thread overview]
Message-ID: <87tu5iyo7k.fsf@gnus.org> (raw)
In-Reply-To: <87v8pyc7ad.fsf@tucano.isti.cnr.it> ("Francesco Potortì"'s message of "Thu, 08 Sep 2022 15:41:46 +0200")
[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]
Francesco Potortì <pot@gnu.org> writes:
> Yes. Can you please send it to me together with my report? (I don't
> remember the problem any more...)
Patch included below, and here's the original report:
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)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-WIP-Try-to-fix-53702.patch --]
[-- Type: text/x-diff, Size: 1031 bytes --]
From 5346b90b9884b9190cfe77310f2444ed35d182eb Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@web.de>
Date: Wed, 2 Feb 2022 01:08:43 +0100
Subject: [PATCH] WIP: Try to fix #53702
---
lisp/calendar/calendar.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 48d308afad..0605e4bf51 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -800,8 +800,8 @@ 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]\\)\\)")
- (day " *" monthname " *" year "[^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.
The defaults are: DAY/MONTH; DAY/MONTH/YEAR; DAY MONTHNAME;
--
2.30.2
next prev parent reply other threads:[~2022-09-08 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 16:21 bug#53702: 27.1; diary does not display some entries in european style Francesco Potortì
2022-02-02 0:39 ` Michael Heerdegen
2022-02-02 0:39 ` Michael Heerdegen
2022-02-02 3:41 ` Michael Heerdegen
2022-03-04 2:00 ` Michael Heerdegen
2022-09-08 13:29 ` Lars Ingebrigtsen
2022-09-08 13:41 ` Francesco Potortì
2022-09-08 13:45 ` Lars Ingebrigtsen [this message]
2022-09-09 4:13 ` Michael Heerdegen
2022-09-09 17:08 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tu5iyo7k.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=53702@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=pot@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.