unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 66994@debbugs.gnu.org
Subject: bug#66994: 30.0.50; Emacs hangs in Todo mode when moving an item to another todo file
Date: Thu, 09 Nov 2023 00:23:54 +0100	[thread overview]
Message-ID: <87msvnq16d.fsf@rub.de> (raw)
In-Reply-To: <83r0l01lca.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 Nov 2023 14:27:33 +0200")

On Wed, 08 Nov 2023 14:27:33 +0200 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Stephen Berman <stephen.berman@gmx.net>
>> 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":

Done.

>> -	   (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?

No, the infinite loop happens when point is at the start of the file.
Todo mode uses narrowing to display categories, and in that case the
problem does not arise, because then point-min is the location of the
start of the first item in the category.

Fixed in commit b7871cefe7b to emacs-29.  Thanks.

Steve Berman





      reply	other threads:[~2023-11-08 23:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 23:13 bug#66994: 30.0.50; Emacs hangs in Todo mode when moving an item to another todo file Stephen Berman
2023-11-08 12:27 ` Eli Zaretskii
2023-11-08 23:23   ` Stephen Berman [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msvnq16d.fsf@rub.de \
    --to=stephen.berman@gmx.net \
    --cc=66994@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).