From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: rudalics@gmx.at, 55684@debbugs.gnu.org, monnier@iro.umontreal.ca,
acm@muc.de
Subject: bug#55684: 29.0.50; wrong-type-argument in minibuffer-only frames
Date: Sat, 28 May 2022 13:57:25 +0300 [thread overview]
Message-ID: <83wne5lyay.fsf@gnu.org> (raw)
In-Reply-To: <YpH+rdIRIYyte0IZ@ACM> (message from Alan Mackenzie on Sat, 28 May 2022 10:51:25 +0000)
> Date: Sat, 28 May 2022 10:51:25 +0000
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
> martin rudalics <rudalics@gmx.at>, 55684@debbugs.gnu.org, acm@muc.de
> From: Alan Mackenzie <acm@muc.de>
>
> Hello, Eli.
>
> On Sat, May 28, 2022 at 08:56:04 +0300, Eli Zaretskii wrote:
> > > Cc: Alan Mackenzie <acm@muc.de>
> > > Date: Fri, 27 May 2022 16:09:13 -0400
> > > From: Stefan Monnier via "Bug reports for GNU Emacs,
> > > the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> > > Package: Emacs
> > > Version: 29.0.50
>
> > Doesn't the same problem exist on the emacs-28 branch? I can
> > reproduce it there.
>
> > > - Fset_frame_selected_window (frame, call1 (Qget_mru_window, frame), Qnil);
> > > + {
> > > + Lisp_Object w = call1 (Qget_mru_window, frame);
> > > + if (!NILP (w)) /* Can be nil in minibuffer-only frames. */
> > > + Fset_frame_selected_window (frame, w, Qnil);
>
> > The NILP(w) test should probably be WINDOW_LIVE_P(w). Martin, do you
> > agree?
>
> I'm not Martin, but I think WINDOW_LIVE is safe, but might not be
> needed. I think get-mru-window will only return a live window or nil.
It starts with a list of live windows, that's true, but who will
guarantee that while it's processing some window cannot be deleted?
WINDOW_LIVE_P is not expensive enough to make such assumptions.
In any case, even if we are sure a window returned by get-mru-window
I'd prefer to use WINDOWP instead of NILP here.
next prev parent reply other threads:[~2022-05-28 10:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 20:09 bug#55684: 29.0.50; wrong-type-argument in minibuffer-only frames Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-28 5:56 ` Eli Zaretskii
2022-05-28 10:51 ` Alan Mackenzie
2022-05-28 10:57 ` Eli Zaretskii [this message]
2022-05-28 13:09 ` Alan Mackenzie
2022-05-28 13:18 ` Eli Zaretskii
2022-05-28 10:48 ` Alan Mackenzie
2022-05-28 14:22 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=83wne5lyay.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=55684@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=monnier@iro.umontreal.ca \
--cc=rudalics@gmx.at \
/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).