GNU bug report logs - #77678
31.0.50; Infloop in multi-isearch-read-files

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Wed, 9 Apr 2025 11:02:02 UTC

Severity: normal

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77678 in the body.
You can then email your comments to 77678 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77678; Package emacs. (Wed, 09 Apr 2025 11:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Heerdegen <michael_heerdegen <at> web.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 09 Apr 2025 11:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Infloop in multi-isearch-read-files
Date: Wed, 09 Apr 2025 13:03:00 +0200
Hello,

depending on the user's settings and environment it is possible that
`multi-isearch-read-files' never terminates because the `string-equal'
test used to compare file names compares expanded and not expanded
names.  This test succeeding is required for the loop to stop.

We should use a more sensible method similar to other places we recently
changed.

Michael.


In GNU Emacs 31.0.50 (build 66, x86_64-pc-linux-gnu, cairo version
 1.16.0) of 2025-04-09 built on drachen
Repository revision: 8ec63b7b102290377a9958be7a5d7996069dd5ff
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101007
System Description: Debian GNU/Linux 12 (bookworm)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77678; Package emacs. (Wed, 09 Apr 2025 13:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 77678 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 77678 <at> debbugs.gnu.org
Subject: Re: bug#77678: 31.0.50; Infloop in multi-isearch-read-files
Date: Wed, 09 Apr 2025 16:02:01 +0300
> Date: Wed, 09 Apr 2025 13:03:00 +0200
> From:  Michael Heerdegen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> depending on the user's settings and environment it is possible that
> `multi-isearch-read-files' never terminates because the `string-equal'
> test used to compare file names compares expanded and not expanded
> names.  This test succeeding is required for the loop to stop.
> 
> We should use a more sensible method similar to other places we recently
> changed.

What method did you have in mind?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77678; Package emacs. (Wed, 09 Apr 2025 13:12:01 GMT) Full text and rfc822 format available.

Message #11 received at 77678 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 77678 <at> debbugs.gnu.org
Subject: Re: bug#77678: 31.0.50; Infloop in multi-isearch-read-files
Date: Wed, 09 Apr 2025 15:13:20 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> What method did you have in mind?

`expand-file-name' both arguments?  I dunno whether this suffices when
Tramp comes into play, though.


Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77678; Package emacs. (Wed, 09 Apr 2025 15:37:02 GMT) Full text and rfc822 format available.

Message #14 received at 77678 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 77678 <at> debbugs.gnu.org
Subject: Re: bug#77678: 31.0.50; Infloop in multi-isearch-read-files
Date: Wed, 09 Apr 2025 18:36:07 +0300
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: 77678 <at> debbugs.gnu.org
> Date: Wed, 09 Apr 2025 15:13:20 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > What method did you have in mind?
> 
> `expand-file-name' both arguments?  I dunno whether this suffices when
> Tramp comes into play, though.

expand-file-name is a good starting point, yes.  If that's not enough,
then comparing the results with file-equal-p should do.  (If even that
doesn't work in all cases, there's probably more here than meets the
eye.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77678; Package emacs. (Wed, 09 Apr 2025 16:43:02 GMT) Full text and rfc822 format available.

Message #17 received at 77678 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 77678 <at> debbugs.gnu.org
Subject: Re: bug#77678: 31.0.50; Infloop in multi-isearch-read-files
Date: Wed, 09 Apr 2025 18:42:38 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

Hi,

>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> > What method did you have in mind?
>>
>> `expand-file-name' both arguments?  I dunno whether this suffices when
>> Tramp comes into play, though.
>
> expand-file-name is a good starting point, yes.  If that's not enough,
> then comparing the results with file-equal-p should do.  (If even that
> doesn't work in all cases, there's probably more here than meets the
> eye.)

file-equal-p uses file-truename which should be OK. Also from the Tramp POV.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77678; Package emacs. (Wed, 09 Apr 2025 16:52:01 GMT) Full text and rfc822 format available.

Message #20 received at 77678 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 77678 <at> debbugs.gnu.org
Subject: Re: bug#77678: 31.0.50; Infloop in multi-isearch-read-files
Date: Wed, 09 Apr 2025 19:49:29 +0300
>> > What method did you have in mind?
>> 
>> `expand-file-name' both arguments?  I dunno whether this suffices when
>> Tramp comes into play, though.
>
> expand-file-name is a good starting point, yes.  If that's not enough,
> then comparing the results with file-equal-p should do.  (If even that
> doesn't work in all cases, there's probably more here than meets the
> eye.)

What does 'read-file-name' return after immediate RET?  From the docstring:

  Read a file name, prompting with PROMPT and completing in directory DIR.
  Retrun the file name as a string.
  The return value is not expanded---you must call expand-file-name
  yourself.

BTW, there is a typo: "Retrun" (not checked if it exists in emacs-30).

Does this return value logic work with all completion frameworks?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77678; Package emacs. (Thu, 10 Apr 2025 06:40:02 GMT) Full text and rfc822 format available.

Message #23 received at 77678 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: michael_heerdegen <at> web.de, 77678 <at> debbugs.gnu.org
Subject: Re: bug#77678: 31.0.50; Infloop in multi-isearch-read-files
Date: Thu, 10 Apr 2025 09:39:20 +0300
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,  77678 <at> debbugs.gnu.org
> Date: Wed, 09 Apr 2025 19:49:29 +0300
> 
> What does 'read-file-name' return after immediate RET?  From the docstring:
> 
>   Read a file name, prompting with PROMPT and completing in directory DIR.
>   Retrun the file name as a string.
>   The return value is not expanded---you must call expand-file-name
>   yourself.

Isn't the answer to your question supplied by the paragraph of the doc
string below?  If not, why not?

  DEFAULT-FILENAME specifies the default file name to return if the
  user exits the minibuffer with the same non-empty string inserted
  by this function.  If DEFAULT-FILENAME is a string, that serves
  as the default.  If DEFAULT-FILENAME is a list of strings, the
  first string is the default.  If DEFAULT-FILENAME is omitted or
  nil, then if INITIAL is non-nil, the default is DIR combined with
  INITIAL; otherwise, if the current buffer is visiting a file,
  that file serves as the default; otherwise, the default is simply
  the string inserted into the minibuffer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77678; Package emacs. (Tue, 29 Apr 2025 17:16:06 GMT) Full text and rfc822 format available.

Message #26 received at 77678 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, Eli Zaretskii <eliz <at> gnu.org>,
 77678 <at> debbugs.gnu.org
Subject: Re: bug#77678: 31.0.50; Infloop in multi-isearch-read-files
Date: Tue, 29 Apr 2025 20:14:20 +0300
close 77678 31.0.50
thanks

>>> > What method did you have in mind?
>>>
>>> `expand-file-name' both arguments?  I dunno whether this suffices when
>>> Tramp comes into play, though.
>>
>> expand-file-name is a good starting point, yes.  If that's not enough,
>> then comparing the results with file-equal-p should do.  (If even that
>> doesn't work in all cases, there's probably more here than meets the
>> eye.)
>
> file-equal-p uses file-truename which should be OK. Also from the Tramp POV.

So now replaced 'string-equal' with 'file-equal-p'.




bug marked as fixed in version 31.0.50, send any further explanations to 77678 <at> debbugs.gnu.org and Michael Heerdegen <michael_heerdegen <at> web.de> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Tue, 29 Apr 2025 17:16:07 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 28 May 2025 11:24:32 GMT) Full text and rfc822 format available.

This bug report was last modified 37 days ago.

Previous Next


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