Subject: bug#66395: 28.2; Todo-mode locks up when trying to edit an entry

From: Stephen Berman <[email-masked]>
Date: Sun, 12 Nov 2023 15:10:44 +0100

On Sun, 05 Nov 2023 23:00:36 +0100 Stephen Berman <[email-masked]> wrote:

> merge 55284 66395
> thanks
>
> On Sat, 07 Oct 2023 23:27:46 +0200 Stephen Berman <[email-masked]> wrote:
>
>> On Sat, 7 Oct 2023 19:06:55 +0000 "Nathan R. DeGruchy" <[email-masked]> 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]))
>>> --==-- Emacs
>>> [2023-10-07] Learn Todo Mode
>>>
>>> ==--== DONE
>>> --==-- Home
>>> [2023-10-07] Get new wiper blades
>>>
>>> ==--== 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'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.
[...]
> 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.
[...]
> Therefore, what I'd like to do first is install this patch, after
> waiting several days for any feedback.

I've now pushed the patch to master as commit 0bfe764fe56.

Steve Berman