From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Erwan Hingant via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69894: 29.1; Icalendar export conflict with calendar iso date Date: Thu, 28 Mar 2024 22:49:33 +0100 Message-ID: <86r0fu2fiq.fsf@mailo.com> References: <86ttl3rnkm.fsf@mailo.com> <86edbuheck.fsf@gnu.org> <6ce76357-6c44-4cba-8094-703cbbf3d10c@cs.ucla.edu> Reply-To: Erwan Hingant Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21890"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.12.1; emacs 29.1 Cc: RwN , Eli Zaretskii , 69894@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 29 05:08:36 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rq3Xg-0005QM-7S for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Mar 2024 05:08:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rq3XD-0002rx-Bw; Fri, 29 Mar 2024 00:08:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rq3XB-0002qX-Ce for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 00:08:05 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rq3XA-0002KH-Sw for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 00:08:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rq3XB-0000Hv-UG for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 00:08:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Erwan Hingant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Mar 2024 04:08:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69894 X-GNU-PR-Package: emacs Original-Received: via spool by 69894-submit@debbugs.gnu.org id=B69894.1711685258931 (code B ref 69894); Fri, 29 Mar 2024 04:08:05 +0000 Original-Received: (at 69894) by debbugs.gnu.org; 29 Mar 2024 04:07:38 +0000 Original-Received: from localhost ([127.0.0.1]:41389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rq3Wj-0000Eq-4J for submit@debbugs.gnu.org; Fri, 29 Mar 2024 00:07:38 -0400 Original-Received: from msg-4.mailo.com ([213.182.54.15]:43982 helo=mailo.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpxcz-0000RJ-4B for 69894@debbugs.gnu.org; Thu, 28 Mar 2024 17:49:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1711662573; bh=AKLD7cYkYlu3JBf5uxs2Xjgkj295+YrakdB6PJ8qCeo=; h=X-EA-Auth:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type; b=SmypCxbYGq4LhxaMzl599RC1kqILvAQZTbax0r1n1jOZToHdrhVJozeWdwppgJcta j1y5ZRl/7oIhny8BbpH12omThHaB0TK7JZ9xemSy35sYwE+xygt6ZdURzed2BkzQnY 0ZLsodV+vilCU5g9YSTEQUnG54Z/AI5qoMeyDeA0= Original-Received: by b221-6.in.mailobj.net [192.168.90.26] with ESMTP via ip-20.mailobj.net [213.182.54.20] Thu, 28 Mar 2024 22:49:33 +0100 (CET) X-EA-Auth: YovxLysyy+43fGvY6Vf5W6vebuNWMOXZU/WDpBwb27PPIpZzfGcwNzY+SWajeOhZsuUWqyRTdvWzaUY/Rr+oCWd9zluQcdI8EOq6VLQB4m0= In-Reply-To: <6ce76357-6c44-4cba-8094-703cbbf3d10c@cs.ucla.edu> (Paul Eggert's message of "Thu, 28 Mar 2024 15:26:38 -0600") X-Mailman-Approved-At: Fri, 29 Mar 2024 00:07:26 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282266 Archived-At: Sorry I cannot help much because I am not an expert in regexp.... I just find a patch which work for me. The 0? is not in the match, the function assume a good structure of the diary file so 2024 099 03 will match 2024 99 3 if I am right? What I am concern is considering - instead of space likewise the default ISO format used . E. Paul Eggert writes: > On 3/28/24 03:53, Eli Zaretskii wrote: >>> diff -u --label >>> /usr/local/share/emacs/29.1/lisp/calendar/icalendar.el.gz >>> --label /tmp/icalendar.el /tmp/jka-commHr8dl /tmp/icalendar.el >>> --- /usr/local/share/emacs/29.1/lisp/calendar/icalendar.el.gz >>> +++ /tmp/icalendar.el >>> @@ -894,8 +894,8 @@ >>> (save-match-data >>> (cond ( ;; iso-style numeric date >>> (string-match (concat "\\s-*" >>> - "\\([0-9]\\{4\\}\\)[ >>> \t/]\\s-*" >>> - "0?\\([1-9][0-9]?\\)[ >>> \t/]\\s-*" >>> + "\\([0-9]\\{4\\}\\)[ >>> \t/-]\\s-*" >>> + "0?\\([1-9][0-9]?\\)[ >>> \t/-]\\s-*" >>> "0?\\([1-9][0-9]?\\)") >>> datestring) >>> (setq year (read (substring datestring >>> (match-beginning 1) >>> >>> Diff finished. Tue Mar 19 02:40:06 2024 >>> >>> Is it a correct solution to proposed? >> Paul, WDYT about the proposed change? > > I'm no expert on diary files. Certainly the "-" is ISO format > (space and tab are not). > > By the way, those two instances of 0?\\([1-9][0-9]?\\) both look > bogus to me, as they > match strings like 099 that are implausible month or > day-of-month numbers.