GNU bug report logs - #55284
28.1; TODO Mode - Unable to operate if `calendar-date-style' is set to 'iso

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: Christos Ballas <cballas99@HIDDEN>; merged with #66395; dated Fri, 6 May 2022 03:29:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 55284 66395. Request was from Stephen Berman <stephen.berman@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 55284) by debbugs.gnu.org; 5 Nov 2023 22:01:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 05 17:01:38 2023
Received: from localhost ([127.0.0.1]:38298 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qzlBZ-0000Bf-Nh
	for submit <at> debbugs.gnu.org; Sun, 05 Nov 2023 17:01:38 -0500
Received: from mout.gmx.net ([212.227.17.20]:48001)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>)
 id 1qzlBU-0000B8-TH; Sun, 05 Nov 2023 17:01:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=s31663417; t=1699221638; x=1699826438; i=stephen.berman@HIDDEN;
 bh=ftVieOPsmcvIWM4Ty8kVuOI+hF3TGSQXNob8dhcduAw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:
 Date;
 b=PcwVo/sXLhdcJue1mJpzIEg1YsqtgJ38ZmiRhhPcy/+dC5wSmOLxAyKrudgPzQJ8
 k3Tmh8O5AuKgaygSq3gL5LE6oNSxUsKO5NfiecoDXUuxTPH21CUhyj8Ekd7dPB/Ug
 obKzTOS58rd0PMpM5XgIqD5tjMoLtpFhnFFi7VTUd6xK00whuJ5hlRKp8UTl9SMra
 qMbHecmmh9bX0h3bsaQiXRGekuK1pybVLZGHrmzlKhZpxVqWkYJr1slUCn6sy/6/p
 ECsdl8yKfxdJ+zQnzkQLtx2OJ21qaUEUabDFfoKt1LNRfmXzwChUoLmk4PL5YeXcC
 ltuFXImo4ELjMsRguA==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from strobelfs2 ([94.134.196.221]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTRMi-1qpyd002MG-00TopJ; Sun, 05
 Nov 2023 23:00:38 +0100
From: Stephen Berman <stephen.berman@HIDDEN>
To: "Nathan R. DeGruchy" <nathan@HIDDEN>
Subject: Re: bug#66395: 28.2; Todo-mode locks up when trying to edit an entry
In-Reply-To: <877cnyazsd.fsf@HIDDEN> (Stephen Berman's message of "Sat, 07
 Oct 2023 23:27:46 +0200")
References: <871qe6ntf4.fsf@ndegruchy-wlt> <877cnyazsd.fsf@HIDDEN>
Date: Sun, 05 Nov 2023 23:00:36 +0100
Message-ID: <87h6lzx3ln.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Provags-ID: V03:K1:9wkQes1T0GENn81ekUJ9z2FgNFct8Xv3CR39dXTIrTga42Gc5YF
 LUHFHdN4iJisjOdkav9+zXuE6zarBPq9wl+3jqJBVeSbxmxGn597NA6Hsk4/+lNTx0EvmB+
 Yanb/OuB7QxV351WOG5qfBygoV55prc6M9bDudeXoZVEcpjAmbXozH9VXFZJrsOqbSA5Q/3
 LYYC5Z5T/NgkzfSmfTPxQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:Tp/Mp4vwwjU=;7F69ybX7gbgCpifRT1E43hFsIPB
 9XxZ1BzIIiVJDFelJJ+U+qEUbD8oPowy1Dc7bRqdlVyxVc3hWGRPMlirl1vW0a8mVGNR5hR7Q
 whS4lvcfUfSdZ0ToMR7n8iejS4HlK9MtuyhO04tfTlo5b5aHXQi1IgqOMwfBT7QS79Yg7597V
 4LfbfF6IKTgwo4DhV1Ad08M2dJEyKCuOpR108IlWkECqUhWss4pXthphuJhCXWssx7v33pULe
 8Sf+lir0sbbGjR+kDbxPPAoHVeYIfOIkJ9OL2zfvRNbfM+xuLCjtxOcKfU0hQNmPG2CTrMwbA
 yMrGrdMa8ZL1TrFbJgwG5mXL1b1X88V/exhF+G9MgLM+nAlzl0FbhNCGb6T2DdzPFuKuPypaH
 NIiUtewumQozfCo3CA/5xlbD7ek+T9L80ViIU+5d8D0v43O7jufMdUxIx7PuF0Y4TZaJy6Xsx
 Hh9RYJbth94JmQyEJUWqy2Fha/2zfgnZpg8SCAnRjYloImtkAgUtpIRMIolrPoO1aQ24/JIf5
 OqZPWQrwXFq3ysIEkM+0GmR9d03d7KiRU5sgcW3v2dzMtARbT0sh8y5Ug/6DeXZQMjG9upqmL
 aWFF4HvEU4tfAKOe7nYDpfSUIqFMnbGPZ5OTsVbJTbQVle9SBeZF2RfA8rPxrCO8VQYPS3Vr2
 JyVBq5Ikv/cS4jVgnWwB5T0KxDLEP0BV/HQAwsDqBls5aMbd5LfT7cvViNfTDvi0/s/bLIutR
 Ua7Wdou+AugbAZXXSydnmrmQznTds34TIY3jTlkcHoIUBQ2YxbBx3bACpuGcjtqwHBbq8W305
 OyUL9z6L2Ouqw32wRRP+2kSd2QeJpRtDuSd34NrnZRctEEE7JnyUrRjfTnm1kfwYY+XcNqXK6
 0vYtT0q5TnlKeUJfW3sHYmP7COp3v4Pa9+isKoKwkFL1xYTm9FwWvyrtbmk/8I5Acmw38IaSR
 7BBp5j6lLdeUd3r5XFpWqixigPU=
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 55284
Cc: Christos Ballas <cballas99@HIDDEN>, LdBeth <andpuke@HIDDEN>,
 66395 <at> debbugs.gnu.org, 55284 <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: -1.7 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

merge 55284 66395
thanks

On Sat, 07 Oct 2023 23:27:46 +0200 Stephen Berman <stephen.berman@HIDDEN>=
 wrote:

> On Sat, 7 Oct 2023 19:06:55 +0000 "Nathan R. DeGruchy" <nathan@degruchy.=
org> wrote:
>
>> I am trying to explore using 'todo-mode' as a todo list and while I can
>> see and create entries in todo-mode using the normal functions, trying
>> to edit an item seems to cause emacs to soft-lock. I can reproduce this
>> in a config-less emacs via `emacs -Q`.
>>
>> Basically, I have a todo-file at $HOME/.config/emacs/todo/tasks.todo,
>> this was created when using `todo-show` initially. The contents are not
>> very complex:
>>
>> (("Emacs" . [1 0 0 0]) ("Home" . [1 0 0 0]))
>> --=3D=3D-- Emacs
>> [2023-10-07] Learn Todo Mode
>>
>> =3D=3D--=3D=3D DONE
>> --=3D=3D-- Home
>> [2023-10-07] Get new wiper blades
>>
>> =3D=3D--=3D=3D DONE
>>
>> When on either of the items, if I hit 'e' to edit them, it causes emacs
>> to lock up, specifically around `todo-done-item-p()`. I found this out
>> by enabling `toggle-debug-on-quit`, reproducing the error, and the
>> C-g'ing out of the loop/lockup. I also tried to trace through the
>> todo-edit-item with edebug-defun. Stepping through, it seems to reach
>> the same predicate function and ... stop.
>>
>> I'm not sure where to go from here.
>
> On Sat, 07 Oct 2023 14:37:00 -0500 LdBeth <andpuke@HIDDEN> wrote:
>
>> As we have discussed on IRC, the nonstandard timestamp format is the ca=
use.
>
> Yes.  This is a duplicate of bug#55284.  At the time that bug was
> reported, I didn't have time to try fixing it (being the todo-mode
> maintainer), and later, unfortunately, I forgot about it.  I'll try to
> look into it soon, but, as I noted in that bug thread, I think it's not
> easy to fix.  One issue is that todo-mode basically employs the same
> handling of date formats as diary-lib.el, and the ISO date style causes
> problems there too, see bug#55286.

I've finally attended to this bug.  The problem is due to using a faulty
regular expression for matching todo date headers in the ISO format.
There was a related bug report years ago about a diary display problem
with the ISO format (bug#8583), and the fix for that (whose author
conceded it was "ugly") points the way to a fix for todo-mode, see the
attached patch (which I have to concede is even uglier and more
complicated than the fix for bug#8583, but I couldn't find a better
way).  (I actually had been aware of the diary bug and the fix, but
didn't try to apply it to todo-mode back then; I don't remember exactly
why but I guess because I concluded it was not straightforward to adapt
the fix to todo-mode and since I didn't use the ISO format myself I
lacked motivation, also because there had been no todo-mode bug reports
about it -- until bug#55286 (and now the current bug), but by then I had
forgotten about bug#8583.)

>> The hang is cause by the while loop `todo-item-start' not properly hand=
le fail
>> case, however.
>>
>> This patch would at least fix the hang.
>>
>> ---
>> LdBeth
>>
>> --- todo-mode.el.old	2023-10-07 14:28:59.000000000 -0500
>> +++ todo-mode.el	2023-10-07 14:30:20.000000000 -0500
>> @@ -5242,8 +5242,8 @@
>>  	   ;; Buffer is widened.
>>  	   (looking-at (regexp-quote todo-category-beg)))
>>      (goto-char (line-beginning-position))
>> -    (while (not (looking-at todo-item-start))
>> -      (forward-line -1))
>> +    (while (and (not (looking-at todo-item-start))
>> +                (=3D (forward-line -1) 0)))
>>      (point)))
>>
>>  (defun todo-item-end ()
>
> Thanks.  Even though this doesn't eliminate other problems with using
> the ISO date style in todo-mode (or in the Emacs Diary), since it does
> prevent the infinite loop here, it may be a good stopgap.

With the attached patch I think this stopgap should be unnecessary: the
while-loop should no longer fail when the ISO date format is used
(barring any bugs in the patch, and if there are, it should fail so they
can be found and fixed).

However, using the ISO date format in todo-mode does necessitate
additional changes, in the code for editing todo item headers, which the
attached patch also includes.

Although with this patch todo-mode now supports the ISO date format,
there remains a problem.  Todo mode (like the Emacs Diary) uses the date
format specified by calendar-date-display-form, which is a user option
that has three default styles (American, European and ISO), which you
can change by customizing `calendar-date-style' or by executing
`calendar-set-date-style'.  But if you change it, that breaks using
todo-mode with any existing todo file that was created using a different
date format, in the same way that trying to use the ISO format with
todo-mode fails without the attached patch (i.e., the current bug).  (As
noted above with reference to bug#55286, the diary is subject to similar
breakage.)

After I came up with the attached patch to support the ISO date format
in todo-mode, I started tackling the issue of changing the date format,
and I now have what I think is a viable solution.  However, to implement
it I've had to make extensive changes in the todo-mode code, and also to
part of the internal structure of todo files (but not to the UI), and
I'm still testing these changes.  They include essentially the changes
in the attached patch (though partly in a more general form).
Therefore, what I'd like to do first is install this patch, after
waiting several days for any feedback.  I'll open a new bug to post and
discuss the more extensive changes I'd like to make.

Steve Berman


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment
Content-Description: Todo mode support for ISO date format
Content-Transfer-Encoding: quoted-printable

diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 093ea0e22b6..5354a65799d 100644
=2D-- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -189,20 +189,53 @@ todo-month-abbrev-array
   "Array of abbreviated month names, in order.
 The final element is \"*\", indicating an unspecified month.")

+(defconst todo--date-pattern-groups
+  (pcase calendar-date-style
+          ('american '((monthname . "6") (month . "7") (day . "8") (year =
. "9")))
+          ('european '((day . "6") (monthname . "7") (month . "8") (year =
. "9")))
+          ('iso '((year . "6") (monthname . "7") (month . "8") (day . "9"=
))))
+  "Alist for grouping date components in `todo-date-pattern'.")
+
 (defconst todo-date-pattern
-  (let ((dayname (diary-name-pattern calendar-day-name-array nil t)))
-    (concat "\\(?4:\\(?5:" dayname "\\)\\|"
-	    (calendar-dlet
-                ((dayname)
-		 (monthname (format "\\(?6:%s\\)" (diary-name-pattern
-						   todo-month-name-array
-						   todo-month-abbrev-array)))
-		 (month "\\(?7:[0-9]+\\|\\*\\)")
-		 (day "\\(?8:[0-9]+\\|\\*\\)")
-		 (year "-?\\(?9:[0-9]+\\|\\*\\)"))
-	      (mapconcat #'eval calendar-date-display-form))
-	    "\\)"))
-  "Regular expression matching a todo item date header.")
+  (let* ((dayname (diary-name-pattern calendar-day-name-array nil t))
+         (d (concat "\\(?" (alist-get 'day todo--date-pattern-groups)
+                    ":[0-9]+\\|\\*\\)"))
+         (mn (format (concat "\\(?" (alist-get 'monthname
+                                               todo--date-pattern-groups)
+                             ":%s\\)")
+                     (diary-name-pattern todo-month-name-array
+                                         todo-month-abbrev-array)))
+         (m (concat "\\(?" (alist-get 'month todo--date-pattern-groups)
+                    ":[0-9]+\\|\\*\\)"))
+         (y (concat "\\(?" (alist-get 'year todo--date-pattern-groups)
+                    ":[0-9]+\\|\\*\\)"))
+         (dd "1111111")
+         (mm "2222222")
+         (yy "3333333")
+         (s (concat "\\(?4:\\(?5:" dayname "\\)\\|"
+	            (calendar-dlet
+                        ((dayname)
+		         (monthname mn)
+		         (year yy)
+		         (month mm)
+		         (day dd))
+                      (mapconcat #'eval calendar-date-display-form))
+	            "\\)")))
+    ;; The default value of calendar-iso-date-display-form calls
+    ;; `string-to-number' on the values of `month' and `day', so we
+    ;; gave them placeholder values above and now replace these with
+    ;; the necessary regexps with appropriately numbered groups, because
+    ;; `todo-edit-item--header' uses these groups.
+    (when (string-match dd s nil t)
+      (setq s (string-replace dd d s)))
+    (when (string-match mm s nil t)
+      (setq s (string-replace mm m s)))
+    (when (string-match yy s nil t)
+      (setq s (string-replace yy y s)))
+    s)
+  "Regular expression matching a todo item date header.
+The value of `calendar-date-display-form' determines the form of
+the date header.")

 ;; By itself this matches anything, because of the `?'; however, it's onl=
y
 ;; used in the context of `todo-date-pattern' (but Emacs Lisp lacks
@@ -2349,11 +2382,19 @@ todo-edit-item--header
 				     (regexp-quote todo-nondiary-end) "?")
 			     (line-end-position) t)
 	  (let* ((otime (match-string-no-properties 2))
-		 (odayname (match-string-no-properties 5))
-		 (omonthname (match-string-no-properties 6))
-		 (omonth (match-string-no-properties 7))
-		 (oday (match-string-no-properties 8))
-		 (oyear (match-string-no-properties 9))
+ 		 (odayname (match-string-no-properties 5))
+                 (mngroup (string-to-number
+                           (alist-get 'monthname todo--date-pattern-group=
s)))
+		 (omonthname (match-string-no-properties mngroup))
+                 (mgroup (string-to-number
+                          (alist-get 'month todo--date-pattern-groups)))
+		 (omonth (match-string-no-properties mgroup))
+                 (dgroup (string-to-number
+                          (alist-get 'day todo--date-pattern-groups)))
+		 (oday (match-string-no-properties dgroup))
+                 (ygroup (string-to-number
+                          (alist-get 'year todo--date-pattern-groups)))
+		 (oyear (match-string-no-properties ygroup))
 		 (tmn-array todo-month-name-array)
 		 (mlist (append tmn-array nil))
 		 (tma-array todo-month-abbrev-array)
@@ -2399,11 +2440,23 @@ todo-edit-item--header
 		 ((eq what 'month)
 		  (setf day oday
 			year oyear
-			(if (memq 'month calendar-date-display-form)
+                        ;; With default ISO style, 'month is in a
+                        ;; sublist of c-d-d-f, so we flatten it.
+			(if (memq 'month (flatten-tree
+                                          calendar-date-display-form))
 			    month
 			  monthname)
 			(cond ((not current-prefix-arg)
-			       (todo-read-date 'month))
+			       (let ((nmonth (todo-read-date 'month)))
+                                 ;; If old month is given as a number,
+                                 ;; have to convert new month name to
+                                 ;; the corresponding number.
+                                 (when omonth
+                                   (setq nmonth
+                                         (number-to-string
+                                          (1+ (seq-position tma-array
+                                                            nmonth)))))
+                                 nmonth))
 			      ((or (string=3D omonth "*") (=3D mm 13))
 			       (user-error "Cannot increment *"))
 			      (t

--=-=-=--




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

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


Received: (at 55284) by debbugs.gnu.org; 6 May 2022 08:59:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 06 04:59:26 2022
Received: from localhost ([127.0.0.1]:47111 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nmto6-0003Sy-5Y
	for submit <at> debbugs.gnu.org; Fri, 06 May 2022 04:59:26 -0400
Received: from mout.gmx.net ([212.227.17.21]:56057)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1nmto4-0003Sl-IT
 for 55284 <at> debbugs.gnu.org; Fri, 06 May 2022 04:59:25 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1651827556;
 bh=HvjS+Sz/sR64yItv9VZ5mIz2iv4vNfwYtB1khLGN/F8=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=iStpfDoHYsjP8Nv9LrdRA/KiT5JGlf/1fMNfl3+1gUNq6zrQe4WFfLMvpVu01Ybwm
 BYhouT/AgJmtG9/9iXdEeyS9x3dSUl3EiLJmQ0UHEqeTe0kK/Z/Sb+a+zIHJje8TSA
 k0ismQ2KwI2BKIgPEV1XTfGB/HgkGyG8nHcYJCLs=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from strobelfs2 ([89.246.36.127]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mt79F-1o6m4Y3dPt-00tRqg; Fri, 06
 May 2022 10:59:16 +0200
From: Stephen Berman <stephen.berman@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#55284: 28.1; TODO Mode - Unable to operate if
 `calendar-date-style' is set to 'iso
References: <721fd2dd-0409-fc6f-82c7-315e4bbdfe87@HIDDEN>
 <83mtfv17p0.fsf@HIDDEN>
Date: Fri, 06 May 2022 10:59:14 +0200
In-Reply-To: <83mtfv17p0.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 06 May
 2022 09:44:27 +0300")
Message-ID: <87czgrdokd.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-Provags-ID: V03:K1:m4QIxo88Q5xxIn8rzj6CAti2IkGbUeYgnR+0mYFzv2LCOEQ7S62
 Mm0ymRGtFaPYk9Ki/yLmctAohWm9BYpDRsd8dh9vt8XaL40gvERcaOFQyxECM0SkzB7V1Tx
 akO/HC1gTZRTgcICtsS786RjWN8LUtLliTKgsALP6wzR0/SY7Pn/tWsQBLIKTeWN9tyYdEh
 zX0h1Nh2+P5MJTXXqjVrQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:HA5iSRBLNl0=:JcKs8ZQk6dEQW5cYFRI6W/
 KetEA8boRnTfOFrHU6PRXp5ysryTEPFieBlzcChPLlAaLWglxASzjqBKgsh8jYHwXnB4e4eIg
 H5XyH26K2mJl1RMTIVUOGDPjLNKDIQV7Ktc4mwOejHefCmZJF47HSBgd0CuzvATWg89HMsq/f
 TGQxHnCSB1K/OMt0qDSvnRZctSCCJTQBXHaRZ24YMMyceDKwHqYqDKS8SsyTQMEi1k8R4uHg0
 yoaQGmoQ2vrhQgfj/U/Su0iQvQsE8fY2h8wnxF6TNvFTBo2SXFbh+gVeeY3UXZJq8iWUsLTDr
 c72lKbWzCImMAuYrkgl3ZKpqI5NP+pAGYcqn/EIZf3j/R5FkFi1Vaal/ttZQV9kg7LSCgZ9Pp
 v6Ei1qs3M3s8D/JhEZrbGz5FLZDENsJ8rbHulIKBNThHaiRggZKhTjaS+RFrxwJDQeycufsbj
 pESnoySm86c1SaqrlHnf7SS4iCTrSc3Wexgsq96Sy12tzWTZsUlEMjem6jvBW8HhVBGJpI76w
 GuNYyiYdiOw2CDuRb/4bQXKUoBbhGtQGJEfW/d8jE/IwqMmKFPjOKczE3M74dVDrd1XSRTegt
 mLJvZkb/0yg0cl2O177fwk+VgP/MppqqSY8x6IUYw5UiaAhkmMt09JwlBHUGo48D+xt3iKQSl
 yYC7/D8ajS38RjRMsfx0XZkLhDbL0bCFSjp6kV3CYG9/P2yaHfqCMOECPzuvlaCrkULhSN9h6
 Ggt/bT1A4TEr8kYFLs+bYckhPwdqwueOhWngDhctlU0a1yaOxxEYMdxkeGQg0UkyXXICfFd4X
 Mr//IHVSdntTwDZR7CFPKiibnQi0onYcv2AJfpHm145sB96eWV5rS0as2x2fI2eNA43DPS0ib
 I9iAoNt9clb68AO0aC9eaHvTnkZIP4F+6fCxMVZrHKZKa0YNXKFEd1XidwY/LQFGMfSJl4a/g
 mIOVq0FMjBxRsWAgPuc8yUePsjQd6/9i2HoYDKmzhkCNCQu1H+iT1AJn2WjBeaSDoNfvux68e
 oDol2KdxbNzsAixrhooo/7A2fYUYyY3aqEZ+llhyBHLhg69fAEZmPWZzFe56TX5kGaSHIUcwP
 Z87lcdIsnWZnq8=
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 55284
Cc: Christos Ballas <cballas99@HIDDEN>, 55284 <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: -1.7 (-)

On Fri, 06 May 2022 09:44:27 +0300 Eli Zaretskii <eliz@HIDDEN> wrote:

>> Date: Fri, 6 May 2022 00:01:37 +0100
>> From:  Christos Ballas via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
>>
>> Starting from emacs -q
>> (setq calendar-date-style 'iso)
>> M-x todo-show -> Test -> Test

You left out the prompt for a Todo item; typing an item and RET at the
prompt will insert the item into the category with the date header in
ISO format.  However, the date is not correctly fontified, which is a
sign of trouble...

>> In the newly constructed buffer type "i i Test2<enter>"
>> Emacs will now hang until you type "C-g"
>
> It looks like todo-mode.el is basically incompatible with any
> calendar-date-style but 'american'.

It also works with the 'european' style, but indeed not with 'iso'.

> (Btw, you aren't supposed to set calendar-date-style directly.  But
> going through the Customize interface, as you are supposed to, doesn't
> help in this case, because the relevant todo-mode patterns are
> defconst's.)

Yes, this is something that's always bothered me (as Todo mode
maintainer) but IIRC my brief investigation of the issue way back when
convinced me that it was not easy (for me) to fix.  I don't use the ISO
date style in Todo mode myself and saw no complaints till now, so I
haven't tried again to fix it.  Unfortunately, I can't afford to do
time-consuming debugging and testing now, so if it is possible to fix
this bug, I would encourage someone better acquainted than me with the
Calendar/Diary handling of dates to do it.  Otherwise, I'll look into it
when I have the time.

One of the issues I remember being bothered by is if someone wants to
change back and forth between date styles.  It seems that this is not
(fully) supported by diary-lib.el (I'm filing a separate bug report
about that).  If that can be fixed, it might be applicable to Todo mode.

Steve Berman




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

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


Received: (at 55284) by debbugs.gnu.org; 6 May 2022 06:44:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 06 02:44:49 2022
Received: from localhost ([127.0.0.1]:46918 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nmrhp-0008Ln-Ee
	for submit <at> debbugs.gnu.org; Fri, 06 May 2022 02:44:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44502)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1nmrhn-0008LW-7Q
 for 55284 <at> debbugs.gnu.org; Fri, 06 May 2022 02:44:47 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39692)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nmrhh-0002fx-Q3; Fri, 06 May 2022 02:44:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=c4EPuqtusdM7p4C6xUeJD3Q/x5VbT6iKHaG0X1JUtpE=; b=C9/6xiQE74qj
 osy9DTWtM7ljn2XpFCgPf2UEyQ6ze8rxMLSUMORUP2AS/djNBiE6jGL4dtbw30R0S6ikWmuxb9jMu
 GLOUyiokEhIsqu9ZPYz3m92WWs1AkpU382eVLu5ibUxeCC8vxsfz5IAEjmcUrIyohONhlXbx4e/9i
 LgvjP1EgQKitj0ofAJ/lXfmxYtpUyPZ70bmk9qRSOHox68Ti+cpB8eD9BToL6wv8GIYdIX+PDQNMm
 j/FCEQ1gTq2dKUSqu4t8X8pZhrWNdQ5XTkEOI+dW94eqkH3apSLSIA3Trj+oAx0t2rWxY841eGdDP
 Yr/whOkWiVzYEwygwqgMKA==;
Received: from [87.69.77.57] (port=1068 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1nmrhg-0002DU-67; Fri, 06 May 2022 02:44:41 -0400
Date: Fri, 06 May 2022 09:44:27 +0300
Message-Id: <83mtfv17p0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Christos Ballas <cballas99@HIDDEN>
In-Reply-To: <721fd2dd-0409-fc6f-82c7-315e4bbdfe87@HIDDEN>
 (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#55284: 28.1;
 TODO Mode - Unable to operate if `calendar-date-style' is set to 'iso
References: <721fd2dd-0409-fc6f-82c7-315e4bbdfe87@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 55284
Cc: 55284 <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 (---)

> Date: Fri, 6 May 2022 00:01:37 +0100
> From:  Christos Ballas via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> Starting from emacs -q
> (setq calendar-date-style 'iso)
> M-x todo-show -> Test -> Test
> In the newly constructed buffer type "i i Test2<enter>"
> Emacs will now hang until you type "C-g"

It looks like todo-mode.el is basically incompatible with any
calendar-date-style but 'american'.

(Btw, you aren't supposed to set calendar-date-style directly.  But
going through the Customize interface, as you are supposed to, doesn't
help in this case, because the relevant todo-mode patterns are
defconst's.)




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

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


Received: (at submit) by debbugs.gnu.org; 6 May 2022 03:28:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 05 23:28:54 2022
Received: from localhost ([127.0.0.1]:46803 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nmoeD-0000xg-TU
	for submit <at> debbugs.gnu.org; Thu, 05 May 2022 23:28:54 -0400
Received: from lists.gnu.org ([209.51.188.17]:47304)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <cballas99@HIDDEN>) id 1nmkTd-0002r4-Pb
 for submit <at> debbugs.gnu.org; Thu, 05 May 2022 19:01:42 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39430)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <cballas99@HIDDEN>) id 1nmkTd-0000cO-J9
 for bug-gnu-emacs@HIDDEN; Thu, 05 May 2022 19:01:41 -0400
Received: from mr85p00im-zteg06021501.me.com ([17.58.23.183]:45062)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <cballas99@HIDDEN>) id 1nmkTa-0003f9-It
 for bug-gnu-emacs@HIDDEN; Thu, 05 May 2022 19:01:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai;
 t=1651791696; bh=6dyhi1AHOxNV7r4Le8iOlWCAUBwZXqXZaNjmoMHAsqM=;
 h=Message-ID:Date:MIME-Version:To:Subject:From:Content-Type;
 b=R4Dzww8u48r0x+XXwSZKGCPJLGlEHXDFAqrcSAK/UUSWK+d1+JuqbfFGeHvVvLFUp
 X4y6vuuWzeVpynZT2uTTUNY0SMu5e6L889MYVNggshWL6yVs0Z5ml9IDlpWfwXiuLo
 KZb/GC8vQPCNyl8VY1RQlP4B+Wa3VnsKdjrXxXb03W5jdlzw2x1t2YYFga5silb0IA
 8/P7zy55E6b5UwFJ0eEO/RHYs2BlwLCx8yU+uv6UWdeURuI2bEqkSzY/4gjNUwtRkZ
 9OCBfxWEQLiooEzHrBYOzKB/9JzqPyfajl+D9EpQmYahENZ0xX+RfA9eZpOhg10vAI
 Sba15ng+NdIpA==
Received: from [192.168.1.151] (mr38p00im-dlb-asmtp-mailmevip.me.com
 [17.57.152.18])
 by mr85p00im-zteg06021501.me.com (Postfix) with ESMTPSA id 40E6B27945ED
 for <bug-gnu-emacs@HIDDEN>; Thu,  5 May 2022 23:01:34 +0000 (UTC)
Message-ID: <721fd2dd-0409-fc6f-82c7-315e4bbdfe87@HIDDEN>
Date: Fri, 6 May 2022 00:01:37 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
 Thunderbird/91.8.1
To: bug-gnu-emacs@HIDDEN
Subject: 28.1; TODO Mode - Unable to operate if `calendar-date-style' is set
 to 'iso
Content-Language: en-GB
From: Christos Ballas <cballas99@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Proofpoint-ORIG-GUID: 3AWDzFakWUfjdewxQdCAnf0I7wEE19LV
X-Proofpoint-GUID: 3AWDzFakWUfjdewxQdCAnf0I7wEE19LV
X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?=
 =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.816,17.11.62.513.0000000_definitions?=
 =?UTF-8?Q?=3D2022-01-18=5F01:2020-02-14=5F02,2022-01-18=5F01,2021-12-02?=
 =?UTF-8?Q?=5F01_signatures=3D0?=
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999
 clxscore=1011
 phishscore=0 mlxscore=0 bulkscore=0 suspectscore=0 malwarescore=0
 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2202240000 definitions=main-2205050146
Received-SPF: pass client-ip=17.58.23.183; envelope-from=cballas99@HIDDEN;
 helo=mr85p00im-zteg06021501.me.com
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 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,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.1 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 05 May 2022 23:28:52 -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.1 (--)



Starting from emacs -q
(setq calendar-date-style 'iso)
M-x todo-show -> Test -> Test
In the newly constructed buffer type "i i Test2<enter>"
Emacs will now hang until you type "C-g"


In GNU Emacs 28.1 (build 52, x86_64-w64-mingw32)
  of 2022-04-04 built on AVALON
Repository revision: 5a223c7f2ef4c31abbd46367b6ea83cd19d30aa7
Repository branch: heads/emacs-28.1
Windowing system distributor 'Microsoft Corp.', version 10.0.19043
System Description: Microsoft Windows 10 Home (v10.0.2009.19043.1645)

Configured using:
  'configure --without-dbus --with-native-compilation
  --without-compress-install CFLAGS=-O2'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
XPM ZLIB

(NATIVE_COMP present but libgccjit not available)

Important settings:
   value of $LANG: ENG
   locale-coding-system: cp1252

Major mode: Todo

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-mode: t
   show-paren-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   buffer-read-only: t
   line-number-mode: t
   visual-line-mode: t
   indent-tabs-mode: t
   transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
cl-print time-stamp cl-extra seq byte-opt gv bytecomp byte-compile cconv
time-date subr-x thingatpt help-fns radix-tree help-mode todo-mode
cl-loaddefs cl-lib diary-lib diary-loaddefs cal-menu calendar
cal-loaddefs iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 76843 9177)
  (symbols 48 7960 1)
  (strings 32 27028 1585)
  (string-bytes 1 869841)
  (vectors 16 16123)
  (vector-slots 8 256973 11816)
  (floats 8 32 236)
  (intervals 56 477 0)
  (buffers 992 14))





Acknowledgement sent to Christos Ballas <cballas99@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#55284; 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: Sun, 5 Nov 2023 22:15:02 UTC

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