all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Erwan Hingant via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: RwN <rwn@mailo.com>, Eli Zaretskii <eliz@gnu.org>, 69894@debbugs.gnu.org
Subject: bug#69894: 29.1; Icalendar export conflict with calendar iso date
Date: Thu, 28 Mar 2024 22:49:33 +0100	[thread overview]
Message-ID: <86r0fu2fiq.fsf@mailo.com> (raw)
In-Reply-To: <6ce76357-6c44-4cba-8094-703cbbf3d10c@cs.ucla.edu> (Paul Eggert's message of "Thu, 28 Mar 2024 15:26:38 -0600")

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 <eggert@cs.ucla.edu> 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.







  reply	other threads:[~2024-03-28 21:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19  1:56 bug#69894: 29.1; Icalendar export conflict with calendar iso date RwN via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-28  9:53 ` Eli Zaretskii
2024-03-28 21:26   ` Paul Eggert
2024-03-28 21:49     ` Erwan Hingant via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-04-06  9:58       ` Eli Zaretskii
2024-04-06 10:34         ` Erwan Hingant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-08  5:50         ` Ulf Jasper via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-13  7:54           ` Eli Zaretskii

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=86r0fu2fiq.fsf@mailo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=69894@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=erwan.hingant@mailo.com \
    --cc=rwn@mailo.com \
    /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.