Subject: Re: bug#66994: 30.0.50; Emacs hangs in Todo mode when moving an item to another todo file

From: Eli Zaretskii <[email-masked]>
Date: Wed, 08 Nov 2023 14:27:33 +0200

> From: Stephen Berman <[email-masked]>
> Date: Wed, 08 Nov 2023 00:13:36 +0100
> 
> Given that it's an old bug that has apparently never been triggered in
> normal use of todo-mode, I have no problem committing the fix to master.
> But since an infinite loop is always nasty and the fix is
> straightforward and AFAICT safe, I think it's suitable for the release
> branch.  I'll wait for the maintainers' decision.

I'm okay with installing this on the emacs-29 branch, but please
improve the comment to the line you added, so that it explains better
why this condition is needed and how it is related to "C-u m":

> -	   (looking-at (regexp-quote todo-category-beg)))
> +	   (looking-at (regexp-quote todo-category-beg))
> +           ;; With `C-u m' to a file that is then loaded into a buffer.
> +	   (= (point) 1))

Also, should this test point-min instead of literally 1?

Thanks.