From: Brendan O'Dea <bod@debian.org>
To: Ulf Jasper <ulf.jasper@web.de>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
56241@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>,
hokomo <hokomo@airmail.cc>
Subject: bug#56241: [PATCH] icalendar doesn't correctly process arbitrary diary sexp entries
Date: Tue, 4 Jul 2023 20:29:03 +1000 [thread overview]
Message-ID: <ZKP0b9VA3dMSXQrw@c47.org> (raw)
In-Reply-To: <87o7sxpgfm.fsf@panama>
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
On Wed, Nov 23, 2022 at 09:24:45PM +0100, Ulf Jasper wrote:
>I added a test to icalendar-tests.el that verifies that patch
>0001-Fix-detecting-dotted-pairs.patch works as expected.
Note that this test is failing on both the current 'master' and
'emacs-29' branch (excerpt, full log attached):
"Error in line 0 -- (error Could not parse date): `%%(icalendar-tests--diary-float 7 0 1) First Sunday in July 2'\n"
FAILED 25/42 icalendar-export-bug-56241-dotted-pair (0.003671 sec) at lisp/calendar/icalendar-tests.el:1000
From what I can tell, the problem is that while these calls look like
they should be identical:
(diary-float 7 0 1)
(icalendar-tests--diary-float 7 0 1) ;; calls diary-float
in practice, they are handled by different code paths:
icalendar--convert-float-to-ical
icalendar--convert-sexp-to-ical
resp. The key difference being that the first one sets 'date' and
'entry' with calendar-dlet when calling diary-float*, and the latter
does not. diary-float is documented as requiring those to be set.†
I'm not sure of the fix here: if the expectation is that some arbitrary
sexp should be able to indirectly call some of the diary-*‡ functions,
then it may be that icalendar--convert-sexp-to-ical may need to
similarly set those values. Alternately, if that is not supported, then
maybe disable/remove the test.
--bod
* https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/calendar/icalendar.el?id=b42cd524b46a4f29ef13e9d03be9d3df917f9aa3#n1787
† https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/calendar/diary-lib.el?id=b42cd524b46a4f29ef13e9d03be9d3df917f9aa3#n1891
‡ diary-date, diary-block, diary-float, diary-anniversary, diary-cyclic,
and diary-offset (there may be others, those were the ones with
an explicit comment)
[-- Attachment #2: icalendar-tests.log.gz --]
[-- Type: application/gzip, Size: 1770 bytes --]
next prev parent reply other threads:[~2023-07-04 10:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-26 18:36 bug#56241: [PATCH] icalendar doesn't correctly process arbitrary diary sexp entries hokomo
2022-06-27 8:04 ` Lars Ingebrigtsen
2022-06-27 9:42 ` hokomo
2022-06-28 11:21 ` Lars Ingebrigtsen
2022-07-06 18:58 ` hokomo
2022-07-07 8:08 ` Lars Ingebrigtsen
2022-07-24 18:14 ` Ulf Jasper
2022-11-11 13:38 ` Stefan Kangas
2022-11-23 20:24 ` Ulf Jasper
2022-11-24 18:07 ` Ulf Jasper
2023-07-04 10:29 ` Brendan O'Dea [this message]
2023-07-04 14:20 ` Mattias Engdegård
2023-07-07 13:15 ` Mattias Engdegård
2024-01-28 17:09 ` Jeremy Harrison via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=ZKP0b9VA3dMSXQrw@c47.org \
--to=bod@debian.org \
--cc=56241@debbugs.gnu.org \
--cc=hokomo@airmail.cc \
--cc=larsi@gnus.org \
--cc=stefankangas@gmail.com \
--cc=ulf.jasper@web.de \
/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.