GNU bug report logs - #77985
31.0.50; infinite loop in `make-frame-names-alist`

Previous Next

Package: emacs;

Reported by: Al Haji-Ali <abdo.haji.ali <at> gmail.com>

Date: Tue, 22 Apr 2025 11:11:02 UTC

Severity: normal

Found in version 31.0.50

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


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

From: Al Haji-Ali <abdo.haji.ali <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, martin rudalics <rudalics <at> gmx.at>
Cc: 77985 <at> debbugs.gnu.org
Subject: Re: bug#77985: 31.0.50; infinite loop in `make-frame-names-alist`
Date: Sun, 27 Apr 2025 08:40:27 +0100
On 26/04/2025, Eli Zaretskii wrote:
>>      (while (not (eq frame current-frame))
>> 	(setq frame (next-frame frame 0)))
>> 
>> can loop.
>
> Sure, but here the loop is explicit in the looping program, so it
> could prevent the infloop.

Indeed, I thought a loop like this would work without changing the documented behaviour as far as I can see:

,----
| (let ((current-frame (selected-frame))
|       prev-frame
|       frame)
|   (while (and
|           (not (eq frame current-frame))
|           (not (eq frame prev-frame)))
|     (setq
|      prev-frame frame
|      frame (next-frame frame 0))))
`----


On 26/04/2025, martin rudalics wrote:
> - Have t for the MINIFRAME argument of 'next-frame' cycle through all
>    frames including invisible and 'no-other-frame frames.  Simple but
>    this would mean that 'make-frame-names-alist' would return the names
>    of invisible frames too (it could filter them out afterwards).

In my emacs, `make-frame-names-alist` passes 0 to next-frame, but `delete-other-frames` already passes t. 

-- Al




This bug report was last modified 54 days ago.

Previous Next


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