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 #23 received at 77985 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Al Haji-Ali <abdo.haji.ali <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
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 10:22:55 +0200
[Message part 1 (text/plain, inline)]
>> 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))))
> `----

Whatever we do here we won't fix the principal problem with next_frame
namely that

(progn
  (set-frame-parameter nil 'no-other-frame t)
  (next-frame nil 0))

can loop forever.  I attach a patch that should fix the problems with
'make-frame-names-alist' and 'delete-other-frames' using 'frame-list' as
base.

martin
[frame-list-1.diff (text/x-patch, attachment)]

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.