bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69894: 29.1; Icalendar export conflict with calendar iso date


From: Erwan Hingant
Subject: bug#69894: 29.1; Icalendar export conflict with calendar iso date
Date: Thu, 28 Mar 2024 22:49:33 +0100
User-agent: mu4e 1.12.1; emacs 29.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]