GNU bug report logs - #56241
[PATCH] icalendar doesn't correctly process arbitrary diary sexp entries

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: hokomo <hokomo@HIDDEN>; dated Sun, 26 Jun 2022 21:15:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 56241 <at> debbugs.gnu.org:


Received: (at 56241) by debbugs.gnu.org; 11 Nov 2022 13:39:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 11 08:39:05 2022
Received: from localhost ([127.0.0.1]:45380 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1otUFM-0005LH-N2
	for submit <at> debbugs.gnu.org; Fri, 11 Nov 2022 08:39:05 -0500
Received: from mail-oo1-f52.google.com ([209.85.161.52]:33521)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1otUFG-0005KA-IZ
 for 56241 <at> debbugs.gnu.org; Fri, 11 Nov 2022 08:39:02 -0500
Received: by mail-oo1-f52.google.com with SMTP id
 j6-20020a4ab1c6000000b004809a59818cso665551ooo.0
 for <56241 <at> debbugs.gnu.org>; Fri, 11 Nov 2022 05:38:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=KPa9ww+uXK1JdN2AogGXFYN/aMn1/ZkoH2fvIWrpXAY=;
 b=BLPO0EGSBUOn7KXIawQ3RXnTEwjbWkhgW00//bn2FtHLZA6YOSkBjU4q5DtgaVhVGu
 B0HPBcb7Q7jZYgzw+PPeLh3V3Z53aJoN8xeY3djWvDkwuDaRjc3ar0XHEkjdVlW5PzZa
 vi/9GluOVsgowPScIVYWa/MVjVJl57L39LrQEBQsM9uVi6UVurQrYFrr6dvXyJEyxNFn
 qDbngB0Q6pI3LEFEeo+Hmeqkvi8ezN4rSpJfyDjSj3DNBu4az5dXZSkq1l6U1lUpSZvn
 5z0r8aEc0DE0A7FA+5+k73tNyhXR5i1oDHdgOaeGns0ZD67jsZq3AwmE4qFi3eQvCDXu
 ojYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=KPa9ww+uXK1JdN2AogGXFYN/aMn1/ZkoH2fvIWrpXAY=;
 b=ltcF3mjYWrKQMbjavreSSOPFZ7MbFW2w943CtG93UFtQDowqqYM1MYvbFoFfXoQBN/
 V7vdG47VNdSth+AZBUH6CsELLHXmcaXmDeb98bFFRbrqJHgTQqePzV8nad+xw4HIEGxk
 IPrxDJqPV3fyi15Ip0mSu/4/U88d4KLjGN5Spc13Ne67IVJBn+ifffspLpHt7NMGZ/96
 n9zZf7HjcBVhrnfAq6GkOBWzhA3BN+TFGlKtHxcL5aYUBDni0nSnc6uUyd4hYxtS15OZ
 Eq6c23Vqqv9iIVg2YKBM1uKWhQRnP97+yPjxS+3p6vg+lhXGC/hDA8YP18mh62RLiQpZ
 dPpw==
X-Gm-Message-State: ANoB5pn0xl7YV/B/l8tL9Dfq9mNkZsfmNEboGOdxexqvBfzY8MMRUfzj
 IcvcaNpkFNPtuQb2LgfMKX9QNOv57JDnj7ifL8k=
X-Google-Smtp-Source: AA0mqf5BEktbioH70vYzYs8KsEBkq9bjAwaG//F1IpS6S/ULkhxYXgCwJvrqOxFsd7+9Wo46Jav/Y7WUpJdgU59ZjvA=
X-Received: by 2002:a4a:eb95:0:b0:49e:3627:279f with SMTP id
 d21-20020a4aeb95000000b0049e3627279fmr841966ooj.5.1668173933013; Fri, 11 Nov
 2022 05:38:53 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Fri, 11 Nov 2022 05:38:52 -0800
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <8735eq5qee.fsf@panama> (Ulf Jasper's message of "Sun, 24 Jul
 2022 20:14:49 +0200")
References: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
 <87edza8rbu.fsf@HIDDEN> <a9a422de-ac0e-364e-b7af-c1acb02cd7cd@HIDDEN>
 <87mtdxt4mr.fsf@HIDDEN> <8735eq5qee.fsf@panama>
X-Hashcash: 1:20:221111:56241 <at> debbugs.gnu.org::Kn7+ycTxh2lqRSv4:8HUI
MIME-Version: 1.0
Date: Fri, 11 Nov 2022 05:38:52 -0800
Message-ID: <CADwFkm=5GRK19a2=9xU1x1tu5-Hrxt7av_DMwLGjQiitgkEX1A@HIDDEN>
Subject: Re: bug#56241: [PATCH] icalendar doesn't correctly process arbitrary
 diary sexp entries
To: Ulf Jasper <ulf.jasper@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 56241
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 56241 <at> debbugs.gnu.org,
 hokomo <hokomo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ulf Jasper <ulf.jasper@HIDDEN> writes:

> Am 28.06.2022 um 13:21 (+0200) schrieb Lars Ingebrigtsen:
>> hokomo <hokomo@HIDDEN> writes:
>>
>>> Yep, you can use the same testing script and just replace the last
>>> expression with:
>>>
>>> (let ((icalendar-export-sexp-enumeration-days 0))
>>>   (test-diary-sexp "%%(diary-float 7 0 1) First Sunday in July 1")
>>>   (test-diary-sexp "%%(my-float 7 0 1) First Sunday in July 2"))
>>>
>>> which should give you the error I mentioned.
>>
>> Right; I can reproduce that problem.  I've added Ulf to the CCs; perhaps
>> he has some comments.
>
> Sorry for the late reply.  Thanks for the bug report, the patch and for
> analysing the problems.  I'll try to have a look at the icalendar code
> the next days (or so).

That was 15 weeks ago, so here's a friendly ping.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56241; Package emacs. Full text available.
Removed tag(s) patch. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 56241 <at> debbugs.gnu.org:


Received: (at 56241) by debbugs.gnu.org; 24 Jul 2022 18:15:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 24 14:15:13 2022
Received: from localhost ([127.0.0.1]:48641 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oFg8H-00052M-CC
	for submit <at> debbugs.gnu.org; Sun, 24 Jul 2022 14:15:13 -0400
Received: from mout.web.de ([212.227.15.14]:35183)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ulf.jasper@HIDDEN>) id 1oFg8B-00051X-Il
 for 56241 <at> debbugs.gnu.org; Sun, 24 Jul 2022 14:15:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1658686494;
 bh=YfT3d7kflbTwT8cLR6fSRb2GCmjPtejQYh4EEYSBjoc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=n7lu0cKT/pB5jyS3PfiRhZT9PCPU1+8Hljo4wLxCNOFOsRM3jf2urZVvf/vH2p9bC
 I8nueHPLUdPcfuDh3loaTk9D/n0nVmPiSE6kxLxoZwHrqW8BGsghiU8JC8DbH9dAEP
 cGNxdc39sI3LQuO7Lo9NFsM+OAhmWyN4LyZ2a0Cs=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from udesktop ([79.213.242.70]) by smtp.web.de (mrweb005
 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MXGKA-1nzq6K1Ap4-00YwBb; Sun, 24
 Jul 2022 20:14:54 +0200
From: Ulf Jasper <ulf.jasper@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#56241: [PATCH] icalendar doesn't correctly process
 arbitrary diary sexp entries
References: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
 <87edza8rbu.fsf@HIDDEN>
 <a9a422de-ac0e-364e-b7af-c1acb02cd7cd@HIDDEN>
 <87mtdxt4mr.fsf@HIDDEN>
Date: Sun, 24 Jul 2022 20:14:49 +0200
In-Reply-To: <87mtdxt4mr.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Tue,
 28 Jun 2022 13:21:48 +0200")
Message-ID: <8735eq5qee.fsf@panama>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:ow2UzYdfNwSPtR7MujUZaTLBUhQNa+yAiATzH+gQQkHPVwK0MJK
 TbJeddhvqadF05GiH1IrwUIVViOVBC11dJD0SM4wecvMh6Nl/+YymdVmqvcutKCeoTlshSf
 mB0VpvKTI8YI0VjBA72LX+HlpsoObmfr0hooYEQ9uj9ztwWPlC84WL88VE2Wi9EzwMi9w5b
 mVVeJ6+jOXYcXUPsJMpDA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:iLkqAd4V1BA=:WiU9NZ7K1QXVhzBtCSzLJ/
 uGhN5+GUerXa3FUSkDeauav20pEVzB1vVvrliEe4of73m5MAdNPLmjPJ9ZY79tm+3bi/6zFZC
 xVGt30CMtf6NQTabU3+Afaet6j+wE2SB0FjRlbIiTu4dJ7qBosJNpbH1Ht3StaEbN/9VefvOA
 jw5n4vzBppwyGkHS0Q7zyxUkPdqql6IApE0UEc4IC9TfJheHhjoU4uDIVb+mBBft4tMCDv98l
 93PwF9n/KKqLijeuIHXgRrVPzQ0FYPo4dwl/u3SxTFdr+FsXSuNzH4FG8l4JoRZKd1XGt143N
 83CajUGvW0rZfFE8ut1mPbzfqH/+WFwYOB9+OT/Fk3YO6TJ3sBV99ii0YOz1Eo3UdzmCAdWet
 WqPWPFLI/0prOVkd45RPZEq2zitI8LyZzQpIxwnnuc67mXC7ywYMc9y1hqFC3JPiukVvaHpOM
 D9pFwnRhNwcMLXz+nYoXpulHxSuba/5iLKdv8+Ga5W214MxF8yrcsl7w1IOnw9ziDUlFUb7AD
 MlFG8uTolmLkq5nzreJjtaq4qi/4NO3tkbINxKvp165xmcw5OZpTXA7dzbM+GyAp2LvpJXjyI
 c9WPagb12EuOYa2E9QWp6t0nBdgKTmy8Wa30vf1bE/kcyQlZVKjo8R0NjUUNkm4cYhNoV/v2L
 O05qQqO8845cUetW8LiwjCMh+pJe4E9bjLIySYn7g63EbR6TZoKk4WFIU1j8CpMUZZq3t9Udi
 rPkZGYQFPsi1Rcen/azrfv7c0HvqJuWay/TKKUxuo89zdm8r3VrhCfUe/QsoLXLTb4iPWR+U+
 qrD0yChVQydnGB0D14K58MU88v4pN8SRYyZ2FOPEGVUi0nTsMwd60JhyyDhH3dQDGh/sfuhT1
 IaY2IwwpA8nOcdjjtOfqojEZT/cTEYPoNiJpBDkXelnmdJLx9QArb9njRChkLf7M72pRgf2d5
 e66Y9jBSSqx2ykhmlQ+q+MKCiEWvcjeP4LZF7xksQPlBDUj173PvKuiBRfFLiXe4YQpQfBEkC
 KoLt/NsxiHjp+bef7loULX4UjjjJRjmBddU2XiesC+IFzMWyxZa9dUyV3rVQj7zf4UWabHPvM
 cMqfXmdm5sO50kAPty7L2jXEljhSZ9WCZJ4paE0CXTT8Jwn7GAJ34VIqQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 56241
Cc: 56241 <at> debbugs.gnu.org, hokomo <hokomo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Am 28.06.2022 um 13:21 (+0200) schrieb Lars Ingebrigtsen:
> hokomo <hokomo@HIDDEN> writes:
>
>> Yep, you can use the same testing script and just replace the last
>> expression with:
>>
>> (let ((icalendar-export-sexp-enumeration-days 0))
>>   (test-diary-sexp "%%(diary-float 7 0 1) First Sunday in July 1")
>>   (test-diary-sexp "%%(my-float 7 0 1) First Sunday in July 2"))
>>
>> which should give you the error I mentioned.
>
> Right; I can reproduce that problem.  I've added Ulf to the CCs; perhaps
> he has some comments.

Sorry for the late reply.  Thanks for the bug report, the patch and for
analysing the problems.  I'll try to have a look at the icalendar code
the next days (or so).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56241; Package emacs. Full text available.

Message received at 56241 <at> debbugs.gnu.org:


Received: (at 56241) by debbugs.gnu.org; 7 Jul 2022 08:08:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 07 04:08:34 2022
Received: from localhost ([127.0.0.1]:55687 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o9MYs-0002tu-00
	for submit <at> debbugs.gnu.org; Thu, 07 Jul 2022 04:08:34 -0400
Received: from quimby.gnus.org ([95.216.78.240]:36398)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1o9MYo-0002tc-1X
 for 56241 <at> debbugs.gnu.org; Thu, 07 Jul 2022 04:08:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=kP58z53YS3fvI0LyUV55GPIPC1NLG9ngeddLiPwtOKo=; b=fF3LDwPR2E+gmBdGKoyXUfjqDW
 7TNqqwPQS2+yT/Ekl1WjBsflL747znKUvOKbLuq218TGrxIs6NeJquFlnF9wARN3NrLnLijAfPcP2
 /VRpnPX6xjvGDsZ9NizBm6iAuW7x/3hAv4fqL8aEJkODU5d0KUO7f0d+Qx0ejn4s+nw8=;
Received: from [84.212.220.105] (helo=joga)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1o9MYb-0005ts-Ex; Thu, 07 Jul 2022 10:08:20 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: hokomo <hokomo@HIDDEN>
Subject: Re: bug#56241: [PATCH] icalendar doesn't correctly process
 arbitrary diary sexp entries
In-Reply-To: <1cbe531a-8ffd-29ae-42fe-fb1207079aa5@HIDDEN>
 (hokomo@HIDDEN's message of "Wed, 6 Jul 2022 20:58:23 +0200")
References: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
 <87edza8rbu.fsf@HIDDEN>
 <a9a422de-ac0e-364e-b7af-c1acb02cd7cd@HIDDEN>
 <87mtdxt4mr.fsf@HIDDEN>
 <1cbe531a-8ffd-29ae-42fe-fb1207079aa5@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEX09Nb7++Le3sFj
 Y1SKiXUGBgK4uJ8tLSVHRjt/f23///+3Y8xXAAAAAWJLR0QKaND0VgAAAAd0SU1FB+YHBwcoAHss
 DrkAAAGvSURBVDjLdZRNT8JAEIZnkFSOu0B65kOCV4OaeKPCL6AMcFSM0SMayxk1Gn62M7Nttwvy
 HnbD+7DztW0BRAbBehlr0aoPXUR7IPVbyZGvAAcMsOqhLgZvkiCHZgGIujElYNdiXDyKO5l20QCc
 fwwpwdcF/8tkC15aRBsQQERJnxhAk+bGIhvvknrIYEQMAPsMoJ3lQE6w5gbrmawD/jELAPsChgrQ
 gzijCvAn0h86AGf7PZXi5CVg/ZwCgyqQ0DNjxK+1SrBwYAduuv3CTztazBYU4EV54M2N6ApkViCN
 5dpAAViR90NQd97yCIBLPb8UYKoAXl0HvKX3Wu4OKmTeNC8cEALw4nqOeetAw4M8FLQPQJ8CwOXv
 quWmqIAf1nP61Ak28ua2Cu57vWfadqqAftvlBN4DQNd++iHwkhvsMUjdHL9pNWJNp9MHB1ZrBR8x
 bSovR6+xeqhlenuRTrdUfQwKrmpxCPgW3YnuwQmpzOWI+LHxpjQJRVXLr3+BxDMBcKGk8xKg2xTc
 xh4UXwYBvxDprQRgMhrd8vZ0N84j5Z8MyMfA73LRG8IJ2RM+2j+QnMAKWUIZ/wAAACV0RVh0ZGF0
 ZTpjcmVhdGUAMjAyMi0wNy0wN1QwNzo0MDowMCswMDowMFihqZYAAAAldEVYdGRhdGU6bW9kaWZ5
 ADIwMjItMDctMDdUMDc6NDA6MDArMDA6MDAp/BEqAAAAAElFTkSuQmCC
X-Now-Playing: Jana Rush's _Planet Mu 25_: "Mynd Fuc"
Date: Thu, 07 Jul 2022 10:08:16 +0200
Message-ID: <87v8s9gxan.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: hokomo <hokomo@HIDDEN> writes: > It's been a week since
 then. Any ideas on how to move forward or > should we give it more time?
 :-) If you have a possible patch for the issues, that'd be appreciated. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 56241
Cc: Ulf Jasper <ulf.jasper@HIDDEN>, 56241 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

hokomo <hokomo@HIDDEN> writes:

> It's been a week since then. Any ideas on how to move forward or
> should we give it more time? :-)

If you have a possible patch for the issues, that'd be appreciated.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56241; Package emacs. Full text available.

Message received at 56241 <at> debbugs.gnu.org:


Received: (at 56241) by debbugs.gnu.org; 6 Jul 2022 20:14:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 06 16:14:44 2022
Received: from localhost ([127.0.0.1]:55241 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o9BQ4-0003Qr-5y
	for submit <at> debbugs.gnu.org; Wed, 06 Jul 2022 16:14:44 -0400
Received: from [37.120.193.124] (port=39464 helo=mail.cock.li)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hokomo@HIDDEN>) id 1o9AEK-0001G9-EQ
 for 56241 <at> debbugs.gnu.org; Wed, 06 Jul 2022 14:58:34 -0400
Message-ID: <1cbe531a-8ffd-29ae-42fe-fb1207079aa5@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=airmail.cc; s=mail;
 t=1657133905; bh=hmweBYOwzaZUgLN8fObr3lPmPmq4y3rynJwGsgo3s10=;
 h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
 b=g7hNB09NH6lcWaq9WOSH6sVB9Jguu2hrVQT1EdJW5MS5TVts9p+X+yDuHR4JTTEXM
 O4F97GD3vA8A8WbFfW8fDSvQOqnAeosfepo/PWOqKcd1DieOPDceU7sLgvcYDyEYS7
 M6kt9JN6RDAOULB/BaSqy/KztZ1qTaOzTmkHxBmDy5sb6zo88ubighKxlj3C1OTkz2
 dkCNkuXEu+dMkPo39lZKPNp6R9A6JrNFjXdB+T5SCP0G183vObUdVFQN1f/ilWKunM
 4ni2HV6Vxx7ubPwet5WhPTWrg1Ll95yQNDKMYqmJqwS8rH3VFTXywZjWwfPoQZcYU/
 gj4Gmgweob/1Q==
Date: Wed, 6 Jul 2022 20:58:23 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.10.0
Subject: Re: bug#56241: [PATCH] icalendar doesn't correctly process arbitrary
 diary sexp entries
Content-Language: en-US
To: Lars Ingebrigtsen <larsi@HIDDEN>
References: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
 <87edza8rbu.fsf@HIDDEN> <a9a422de-ac0e-364e-b7af-c1acb02cd7cd@HIDDEN>
 <87mtdxt4mr.fsf@HIDDEN>
From: hokomo <hokomo@HIDDEN>
In-Reply-To: <87mtdxt4mr.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  > Right; I can reproduce that problem. I've added Ulf to the
 CCs; perhaps > he has some comments. It's been a week since then. Any ideas
 on how to move forward or should we give it more time? :-) To summarize,
 the problems are: 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -0.0 NICE_REPLY_A           Looks like a legit reply (A)
X-Debbugs-Envelope-To: 56241
X-Mailman-Approved-At: Wed, 06 Jul 2022 16:14:43 -0400
Cc: Ulf Jasper <ulf.jasper@HIDDEN>, 56241 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

> Right; I can reproduce that problem.  I've added Ulf to the CCs; perhaps
> he has some comments.

It's been a week since then. Any ideas on how to move forward or should 
we give it more time? :-)

To summarize, the problems are:

(1) A diary sexp not generating any events for the configured number of 
enumeration days is treated effectively as a parsing failure, meaning 
that the next type of diary entry is tried instead of just not producing 
any events.

(2) Improper parsing of diary sexps (using regexes instead of e.g. 
`read') leads to diary sexps not being able to span multiple lines or 
have more than a single closing parenthesis (i.e. any sort of nested 
expression).

(3) Not strictly in the scope of icalendar itself, but still related the 
handling of diary sexps: Org's parser seems to assume that each diary 
sexp is on a single line. This and the two limitations above end up 
propagating to ox-icalendar.

hokomo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56241; Package emacs. Full text available.

Message received at 56241 <at> debbugs.gnu.org:


Received: (at 56241) by debbugs.gnu.org; 28 Jun 2022 11:22:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 28 07:22:19 2022
Received: from localhost ([127.0.0.1]:54073 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o69IR-0000Zz-OK
	for submit <at> debbugs.gnu.org; Tue, 28 Jun 2022 07:22:19 -0400
Received: from quimby.gnus.org ([95.216.78.240]:47426)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1o69IP-0000ZZ-Ri
 for 56241 <at> debbugs.gnu.org; Tue, 28 Jun 2022 07:22:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=4yrrm+SuWzHKEZT/GcHLMO2f5GrpUp2JQ8yXJ8F2+/M=; b=OsyaX/FIHvOKeu74KB/IS6aDWI
 YmgyY9mGnSdDiazBM0nrV4M5z7LHkW8XAJ2Vwy1rSbz++1uR3govzufrAHO+ELuhQX0z/U0aWnqfr
 8H3+2/FfN6PMrJ6RvPU961kkfYUYpRyOYmpzlFGWJL2QQuIJLmuCumM+U6iuuvIkGq7w=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1o69Hx-0001TS-Mv; Tue, 28 Jun 2022 13:22:00 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: hokomo <hokomo@HIDDEN>
Subject: Re: bug#56241: [PATCH] icalendar doesn't correctly process
 arbitrary diary sexp entries
References: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
 <87edza8rbu.fsf@HIDDEN>
 <a9a422de-ac0e-364e-b7af-c1acb02cd7cd@HIDDEN>
X-Now-Playing: Rev. J. M. Gates's _Anthology of American Folk Music: Social
 Music (2)_: "You Must Be Born Again"
Date: Tue, 28 Jun 2022 13:21:48 +0200
In-Reply-To: <a9a422de-ac0e-364e-b7af-c1acb02cd7cd@HIDDEN>
 (hokomo@HIDDEN's message of "Mon, 27 Jun 2022 11:42:34 +0200")
Message-ID: <87mtdxt4mr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  hokomo <hokomo@HIDDEN> writes: > Yep, you can use the
 same testing script and just replace the last > expression with: > > (let
 ((icalendar-export-sexp-enumeration-days 0)) > (test-diary-sexp
 "%%(diary-float 7 0 1) First Sunday in [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 56241
Cc: Ulf Jasper <ulf.jasper@HIDDEN>, 56241 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

hokomo <hokomo@HIDDEN> writes:

> Yep, you can use the same testing script and just replace the last
> expression with:
>
> (let ((icalendar-export-sexp-enumeration-days 0))
>   (test-diary-sexp "%%(diary-float 7 0 1) First Sunday in July 1")
>   (test-diary-sexp "%%(my-float 7 0 1) First Sunday in July 2"))
>
> which should give you the error I mentioned.

Right; I can reproduce that problem.  I've added Ulf to the CCs; perhaps
he has some comments.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56241; Package emacs. Full text available.

Message received at 56241 <at> debbugs.gnu.org:


Received: (at 56241) by debbugs.gnu.org; 27 Jun 2022 12:31:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 27 08:31:31 2022
Received: from localhost ([127.0.0.1]:50223 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5ntn-0006zN-Ox
	for submit <at> debbugs.gnu.org; Mon, 27 Jun 2022 08:31:31 -0400
Received: from [37.120.193.124] (port=34734 helo=mail.cock.li)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hokomo@HIDDEN>) id 1o5lGU-00083E-Q3
 for 56241 <at> debbugs.gnu.org; Mon, 27 Jun 2022 05:42:47 -0400
Content-Type: multipart/mixed; boundary="------------x92lbi8WXdL97kq43XFKoufV"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=airmail.cc; s=mail;
 t=1656322955; bh=VStskTBxz/jmr8YJe6Jxh63ZUdgk4DqmVbDVgrRDyZU=;
 h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
 b=Jjzcp5RQb+AMigMzRzzXGO0r8BM1fodFtsCAQZ9jTMeqOoKuRuJPbrsfZV8aJXfe5
 9I6uKwkEwvNMpeJio/Te1YhsVBfDabVLJGASoeZGQEwG5biiI8/4jAsbdnemdNiMcW
 qoIUQopuRpkO+8AqyOZ1MUA79A6JMQCpRwUai7b2QAiigXTnHAsVd0+kNLU6AY0Cex
 jCAzYD14VDF93Ls2+X2RglIAoYx9HsledGdtvt4tQEu5f6rMRhQCrkRSzhQMPD8EH8
 FvhWPk0Q49cgXL2itwD/NFZ/WQPC0P0pC2Voy+cMFVCNCQRo3YWLzayZ+JtwSnLJHx
 GslOaKm8lpaHg==
Message-ID: <a9a422de-ac0e-364e-b7af-c1acb02cd7cd@HIDDEN>
Date: Mon, 27 Jun 2022 11:42:34 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.10.0
Subject: Re: bug#56241: [PATCH] icalendar doesn't correctly process arbitrary
 diary sexp entries
Content-Language: en-US
To: Lars Ingebrigtsen <larsi@HIDDEN>
References: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
 <87edza8rbu.fsf@HIDDEN>
From: hokomo <hokomo@HIDDEN>
In-Reply-To: <87edza8rbu.fsf@HIDDEN>
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  >> `icalendar-export-sexp-enumeration-days' is set to 366
 to guarantee >> that the sexp event occurs at least once. It looks like
 there's
 a >> different bug (?) where, even if an entry is recognized a [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 T_SPF_HELO_TEMPERROR   SPF: test of HELO record failed (temperror)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -0.0 NICE_REPLY_A           Looks like a legit reply (A)
X-Debbugs-Envelope-To: 56241
X-Mailman-Approved-At: Mon, 27 Jun 2022 08:31:26 -0400
Cc: 56241 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.3 (/)

This is a multi-part message in MIME format.
--------------x92lbi8WXdL97kq43XFKoufV
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

>> `icalendar-export-sexp-enumeration-days' is set to 366 to guarantee
>> that the sexp event occurs at least once. It looks like there's a
>> different bug (?) where, even if an entry is recognized as an
>> arbitrary diary sexp, if it doesn't produce any events, the converter
>> will go ahead with trying to interpret it in a different way and
>> eventually fail. E.g., lowering the enumeration days to 0 gives:
>>
>> "Error in line 0 -- (error Could not parse date): ‘%%(my-float 7 0 1)
>> First Sunday in July 2’"
>>
>> after exhausting all of the known entry types. Should I file this as a
>> separate bug?
> 
> No, we can work on this problem here in this bug report.
> 
> Do you have a recipe to reproduce the problem, starting from "emacs -Q"?

Yep, you can use the same testing script and just replace the last 
expression with:

(let ((icalendar-export-sexp-enumeration-days 0))
   (test-diary-sexp "%%(diary-float 7 0 1) First Sunday in July 1")
   (test-diary-sexp "%%(my-float 7 0 1) First Sunday in July 2"))

which should give you the error I mentioned. I don't have a patch for 
this on hand but it would probably require restructuring the surrounding 
code a little bit.

There's another bug that concerns sexps that contain more than a single 
closing parenthesis. Seems like the icalendar code uses a bunch of 
regexes to parse the sexp (see `icalendar--convert-sexp-to-ical'), 
rather than something like `read' or `read-from-string' (which is what 
diary does, as well as org-agenda). To reproduce (with the same testing 
code as before):

(let ((icalendar-export-sexp-enumeration-days 366))
   (test-diary-sexp "%%(= (calendar-day-of-week date) 0) Sunday 1")
   (test-diary-sexp "%%(= 0 (calendar-day-of-week date)) Sunday 2"))

No matter whether the closing parentheses are bunched together or 
separated, parsing fails either way. I've attached a draft of a patch 
that modifies as little as possible and makes the above two cases work, 
but that's not enough as there's special handling of `and' forms. 
Furthermore, sexps that span multiple lines fail for the same reason, 
even though diary handles them just fine of course. Ideally the whole 
function should be rewritten to just use `read-from-string'. I don't 
understand why `and' forms are handled specially though, so I'm not sure 
how to proceed here.

A last thing to note -- even though org-agenda properly handles 
multiline sexps and sexps with an arbitrary number of closing 
parentheses (because it does the parsing manually and uses 
`forward-sexp'), Org's parser itself does not properly handle multiline 
sexps (but does handle multiple closing parentheses). To confirm, use 
`org-element-at-point' at the beginning of these two diary sexps in an 
org-mode buffer:

%%(let ((a 123) (b 456)) (+ a b))

%%(let ((a 123)
         (b 456))
    (+ a b))

All of these bugs also propagate to ox-icalendar (which is how I got 
into exploring this whole thing) since it relies on the Org parse tree 
to pull out 'diary-sexp elements and on icalendar to export them into 
iCalendar format.

Let me know if you want me to report any of these as separate bugs and 
what would be the best thing to do here.

Regards,
hokomo
--------------x92lbi8WXdL97kq43XFKoufV
Content-Type: text/x-patch; charset=UTF-8;
 name="0002-Draft-fix-nested-diary-sexps.patch"
Content-Disposition: attachment;
 filename="0002-Draft-fix-nested-diary-sexps.patch"
Content-Transfer-Encoding: base64

RnJvbSBlMzVlYTFmM2E5YzYyZDljMDdkMTBkOWVjODliZjg3OTA1ODc3NWMyIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBob2tvbW8gPGhva29tb0BhaXJtYWlsLmNjPgpEYXRl
OiBTYXQsIDI1IEp1biAyMDIyIDEzOjQzOjI4ICswMjAwClN1YmplY3Q6IFtQQVRDSF0gRml4
IG5lc3RlZCBkaWFyeSBzZXhwcwoKLS0tCiBsaXNwL2NhbGVuZGFyL2ljYWxlbmRhci5lbCB8
IDggKysrKystLS0KIDEgZmlsZSBjaGFuZ2VkLCA1IGluc2VydGlvbnMoKyksIDMgZGVsZXRp
b25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9jYWxlbmRhci9pY2FsZW5kYXIuZWwgYi9saXNw
L2NhbGVuZGFyL2ljYWxlbmRhci5lbAppbmRleCA0NmJjZjQ1NjZmLi4yYjZhZjc5ODEyIDEw
MDY0NAotLS0gYS9saXNwL2NhbGVuZGFyL2ljYWxlbmRhci5lbAorKysgYi9saXNwL2NhbGVu
ZGFyL2ljYWxlbmRhci5lbApAQCAtMTY0MSw5ICsxNjQxLDExIEBAIGljYWxlbmRhci0tY29u
dmVydC1zZXhwLXRvLWljYWwKICAgICAgICAgICAgICAgICAgICAgICAgZW50cnktbWFpbikK
ICAgICAgICAgIDs7IHJlZ3VsYXIgc2V4cCBlbnRyeQogICAgICAgICAgKGljYWxlbmRhci0t
ZG1zZyAiZGlhcnktc2V4cCAlcyIgZW50cnktbWFpbikKLSAgICAgICAgIChsZXQgKChwMSAo
c3Vic3RyaW5nIGVudHJ5LW1haW4gKG1hdGNoLWJlZ2lubmluZyAxKSAobWF0Y2gtZW5kIDEp
KSkKLSAgICAgICAgICAgICAgIChwMiAoc3Vic3RyaW5nIGVudHJ5LW1haW4gKG1hdGNoLWJl
Z2lubmluZyAyKSAobWF0Y2gtZW5kIDIpKSkKLSAgICAgICAgICAgICAgIChub3cgKG9yIHN0
YXJ0IChjdXJyZW50LXRpbWUpKSkpCisgICAgICAgICAobGV0KiAoKGVudHJ5LW1haW4gKHN1
YnN0cmluZyBlbnRyeS1tYWluIDIpKQorICAgICAgICAgICAgICAgIChyZXMgKHJlYWQtZnJv
bS1zdHJpbmcgZW50cnktbWFpbikpCisgICAgICAgICAgICAgICAgKHAxIChwcmluMS10by1z
dHJpbmcgKGNhciByZXMpKSkKKyAgICAgICAgICAgICAgICAocDIgKHN1YnN0cmluZyBlbnRy
eS1tYWluIChjZHIgcmVzKSkpCisgICAgICAgICAgICAgICAgKG5vdyAob3Igc3RhcnQgKGN1
cnJlbnQtdGltZSkpKSkKICAgICAgICAgICAgKGRlbGV0ZSBuaWwKICAgICAgICAgICAgICAg
ICAgICAobWFwY2FyCiAgICAgICAgICAgICAgICAgICAgIChsYW1iZGEgKG9mZnNldCkKLS0g
CjIuMzUuMwoK

--------------x92lbi8WXdL97kq43XFKoufV--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56241; Package emacs. Full text available.

Message received at 56241 <at> debbugs.gnu.org:


Received: (at 56241) by debbugs.gnu.org; 27 Jun 2022 08:05:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 27 04:05:07 2022
Received: from localhost ([127.0.0.1]:49736 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5jk3-0007aa-CZ
	for submit <at> debbugs.gnu.org; Mon, 27 Jun 2022 04:05:07 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34442)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1o5jk0-0007ZS-QV
 for 56241 <at> debbugs.gnu.org; Mon, 27 Jun 2022 04:05:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=ZnarujxQk3TU5g9Qaxl0MOWVFm6x94ex6eytLt6QC3o=; b=lFKCYlEyuqLDzRtfm9wm5+zbZg
 KZDxvkagbHBN8NhDRXhbOT6rxigwLEB9Rd5bry7e1ixYfbI8n/Ghs2KU+qUbzfGwVC6ZnYprUsgB0
 6exuO77gEoU7FIDlcVN0kZpc849pFTgYa2xXugGBPZ/7Ej0iGIds73pwSecjvxhpO9ek=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1o5jjq-0003Ny-0g; Mon, 27 Jun 2022 10:04:56 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: hokomo <hokomo@HIDDEN>
Subject: Re: bug#56241: [PATCH] icalendar doesn't correctly process
 arbitrary diary sexp entries
References: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
Date: Mon, 27 Jun 2022 10:04:53 +0200
In-Reply-To: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
 (hokomo@HIDDEN's message of "Sun, 26 Jun 2022 20:36:46 +0200")
Message-ID: <87edza8rbu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  hokomo <hokomo@HIDDEN> writes: > Exporting the my-float
    sexp will fail with: > > "Error in line 0 -- (wrong-type-argument listp First
    Sunday in July > 2): ‘%%(my-float 7 0 1) First Sunday in July 2" > > because
    the returned list [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 56241
Cc: 56241 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

hokomo <hokomo@HIDDEN> writes:

> Exporting the my-float sexp will fail with:
>
> "Error in line 0 -- (wrong-type-argument listp First Sunday in July
> 2): =E2=80=98%%(my-float 7 0 1) First Sunday in July 2"
>
> because the returned list is confused for a dotted pair.

Thanks; patch pushed to Emacs 29.

> `icalendar-export-sexp-enumeration-days' is set to 366 to guarantee
> that the sexp event occurs at least once. It looks like there's a
> different bug (?) where, even if an entry is recognized as an
> arbitrary diary sexp, if it doesn't produce any events, the converter
> will go ahead with trying to interpret it in a different way and
> eventually fail. E.g., lowering the enumeration days to 0 gives:
>
> "Error in line 0 -- (error Could not parse date): =E2=80=98%%(my-float 7 =
0 1)
> First Sunday in July 2=E2=80=99"
>
> after exhausting all of the known entry types. Should I file this as a
> separate bug?

No, we can work on this problem here in this bug report.

Do you have a recipe to reproduce the problem, starting from "emacs -Q"?

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#56241; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 26 Jun 2022 21:14:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 17:14:34 2022
Received: from localhost ([127.0.0.1]:49235 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o5ZaQ-0003ya-3T
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 17:14:34 -0400
Received: from lists.gnu.org ([209.51.188.17]:39418)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hokomo@HIDDEN>) id 1o5X7y-00045L-25
 for submit <at> debbugs.gnu.org; Sun, 26 Jun 2022 14:37:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47614)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hokomo@HIDDEN>) id 1o5X7x-0001Ua-KZ
 for bug-gnu-emacs@HIDDEN; Sun, 26 Jun 2022 14:36:57 -0400
Received: from [37.120.193.124] (port=50080 helo=mail.cock.li)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hokomo@HIDDEN>) id 1o5X7t-00046l-Iu
 for bug-gnu-emacs@HIDDEN; Sun, 26 Jun 2022 14:36:56 -0400
Content-Type: multipart/mixed; boundary="------------JvJd182OBMvd6wzHkoaldjOz"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=airmail.cc; s=mail;
 t=1656268607; bh=UPYD2zmxkZp0r+lPf/zboLkrFUZPiCUkaZgdqxhlAFM=;
 h=Date:To:From:Subject:From;
 b=OAY48TtqDqRCtcIAcjdIe/OUGTeY+oZ9xAPdZTug8DwCYl4ant+kRkv/Ea/xSdU2m
 75a6IK1BkNnJgLujLkpDfcHdN6yCYfIjk4dxrpYkcFbQWYuXE8BYV61JlWZwGmebac
 0J4KidDvljb4/zo/dmEFfAGh74hjxXZp2o6R/U4TTJwTG+K+QinWtO2iO8PHXOiMWO
 5yqXPicMEHqOWwlBYqtmUwj1m3WJ802ftzskPQVdswDmdqzZ4vTFyXNzDrC8ITRCct
 6zrCQYDeczsO1nhNPP/q4HdjwHZvbriCbXWLG6UmEZP7so3HXbPay05Gzt8dgXmSgB
 h3Bj9ygEvgfKA==
Message-ID: <21bff87f-b8dc-c7bc-41ab-97c7077a0535@HIDDEN>
Date: Sun, 26 Jun 2022 20:36:46 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.10.0
Content-Language: en-US
To: bug-gnu-emacs@HIDDEN
From: hokomo <hokomo@HIDDEN>
Subject: [PATCH] icalendar doesn't correctly process arbitrary diary sexp
 entries
X-Host-Lookup-Failed: Reverse DNS lookup failed for 37.120.193.124 (failed)
Received-SPF: pass client-ip=37.120.193.124; envelope-from=hokomo@HIDDEN;
 helo=mail.cock.li
X-Spam_score_int: -12
X-Spam_score: -1.3
X-Spam_bar: -
X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 26 Jun 2022 17:14:28 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

This is a multi-part message in MIME format.
--------------JvJd182OBMvd6wzHkoaldjOz
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

icalendar is capable of exporting arbitrary diary sexp entries, but it 
looks like there's a bug in the code. Each conversion function 
`icalendar--convert-*-to-ical' can return either a dotted pair or a list 
of such pairs, but the code fails to differentiate the two cases properly.

To reproduce:

(require 'icalendar)

(defun test-diary-sexp (sexp)
   (message "Testing %S\n" sexp)
   (let ((file (make-temp-file "export.ics")))
     (with-temp-buffer
       (insert sexp)
       (icalendar-export-region (point-min) (point-max) file))
     (with-current-buffer (get-buffer "*icalendar-errors*")
       (message "export: %S\n" (with-temp-buffer
                             (insert-file-contents file)
                             (buffer-string)))
       (message "errors: %S" (buffer-string))))
   (terpri))

(defun my-float (&rest args)
   (apply #'diary-float args))

(let ((icalendar-export-sexp-enumeration-days 366))
   (test-diary-sexp "%%(diary-float 7 0 1) First Sunday in July 1")
   (test-diary-sexp "%%(my-float 7 0 1) First Sunday in July 2"))

Exporting the my-float sexp will fail with:

"Error in line 0 -- (wrong-type-argument listp First Sunday in July 2): 
‘%%(my-float 7 0 1) First Sunday in July 2"

because the returned list is confused for a dotted pair.

`icalendar-export-sexp-enumeration-days' is set to 366 to guarantee that 
the sexp event occurs at least once. It looks like there's a different 
bug (?) where, even if an entry is recognized as an arbitrary diary 
sexp, if it doesn't produce any events, the converter will go ahead with 
trying to interpret it in a different way and eventually fail. E.g., 
lowering the enumeration days to 0 gives:

"Error in line 0 -- (error Could not parse date): ‘%%(my-float 7 0 1) 
First Sunday in July 2’"

after exhausting all of the known entry types. Should I file this as a 
separate bug?

Regards,
hokomo
--------------JvJd182OBMvd6wzHkoaldjOz
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-Fix-detecting-dotted-pairs.patch"
Content-Disposition: attachment;
 filename="0001-Fix-detecting-dotted-pairs.patch"
Content-Transfer-Encoding: base64

RnJvbSA2OTFmMzRhMzAxMzU5ODkzYmNmZmZmOGU0ZTBjODc5NGExZmQ1ZTY4IE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBob2tvbW8gPGhva29tb0BhaXJtYWlsLmNjPgpEYXRl
OiBTYXQsIDI1IEp1biAyMDIyIDA5OjQ0OjU0ICswMjAwClN1YmplY3Q6IFtQQVRDSF0gRml4
IGRldGVjdGluZyBkb3R0ZWQgcGFpcnMKCiogbGlzcC9jYWxlbmRhci9pY2FsZW5kYXIuZWwg
KGljYWxlbmRhci1leHBvcnQtcmVnaW9uKTogRml4IGRldGVjdGluZwpkb3R0ZWQgcGFpcnMu
Ci0tLQogbGlzcC9jYWxlbmRhci9pY2FsZW5kYXIuZWwgfCAzICsrLQogMSBmaWxlIGNoYW5n
ZWQsIDIgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2xpc3Av
Y2FsZW5kYXIvaWNhbGVuZGFyLmVsIGIvbGlzcC9jYWxlbmRhci9pY2FsZW5kYXIuZWwKaW5k
ZXggMWE1YTA3MWUyMC4uY2Y1NDI5Mzk4OSAxMDA2NDQKLS0tIGEvbGlzcC9jYWxlbmRhci9p
Y2FsZW5kYXIuZWwKKysrIGIvbGlzcC9jYWxlbmRhci9pY2FsZW5kYXIuZWwKQEAgLTExNDQs
NyArMTE0NCw4IEBAIGljYWxlbmRhci1leHBvcnQtcmVnaW9uCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgKGNkciBjb250ZW50cy1uLXN1bW1hcnkpKSkpCiAgICAg
ICAgICAgICAgICAgICAgICAgKHNldHEgcmVzdWx0IChjb25jYXQgcmVzdWx0IGhlYWRlciBj
b250ZW50cyBhbGFybQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICJcbkVORDpWRVZFTlQiKSkpCi0gICAgICAgICAgICAgICAgICAgIChpZiAoY29uc3Ag
Y25zLWNvbnMtb3ItbGlzdCkKKyAgICAgICAgICAgICAgICAgICAgKGlmIChhbmQgKGNvbnNw
IGNucy1jb25zLW9yLWxpc3QpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChub3Qg
KGxpc3RwIChjZHIgY25zLWNvbnMtb3ItbGlzdCkpKSkKICAgICAgICAgICAgICAgICAgICAg
ICAgIChsaXN0IGNucy1jb25zLW9yLWxpc3QpCiAgICAgICAgICAgICAgICAgICAgICAgY25z
LWNvbnMtb3ItbGlzdCkpKQogICAgICAgICAgIDs7IGhhbmRsZSBlcnJvcnMKLS0gCjIuMzUu
MwoK

--------------JvJd182OBMvd6wzHkoaldjOz--




Acknowledgement sent to hokomo <hokomo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#56241; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 11 Nov 2022 13:45:02 UTC

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