From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: emacs-28 9c0eec4ed8: * src/window.c (select_window): Fix assert for buffer = non-active minibuffer
Date: Wed, 24 Aug 2022 22:28:38 -0400 [thread overview]
Message-ID: <jwv5yih5acf.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20220819150749.326DBC0088A@vcs2.savannah.gnu.org> (Alan Mackenzie's message of "Fri, 19 Aug 2022 11:07:49 -0400 (EDT)")
Hi Alan,
Alan Mackenzie [2022-08-19 11:07:49] wrote:
> branch: emacs-28
> commit 9c0eec4ed86713519819b2e33dc3fff23f0e5f3d
> Author: Alan Mackenzie <acm@muc.de>
> Commit: Alan Mackenzie <acm@muc.de>
>
> * src/window.c (select_window): Fix assert for buffer = non-active minibuffer
> ---
> src/window.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/window.c b/src/window.c
> index 2576b66a18..35ec2a1f90 100644
> --- a/src/window.c
> +++ b/src/window.c
> @@ -554,7 +554,9 @@ select_window (Lisp_Object window, Lisp_Object norecord,
> frame is active. */
> Fselect_frame (frame, norecord);
> /* Fselect_frame called us back so we've done all the work already. */
> - eassert (EQ (window, selected_window));
> + eassert (EQ (window, selected_window)
> + || (EQ (window, f->minibuffer_window)
> + && NILP (Fminibufferp (XWINDOW (window)->contents, Qt))));
> return window;
> }
> else
Thinking again about this patch, I wonder if it's the right behavior.
I mean, in the case that your patch now allows, we return from
`select-window` without having selected the requested window (we
selected that window's frame, but not that actual window because it's
a mini-window whose minibuffer is not currently active).
I understand that it's not a good idea to select that mini-window, but
maybe instead of terminating as if we'd done it, we should signal an
error in that case because that window is not currently selectable,
a bit like a dead window.
Stefan
next parent reply other threads:[~2022-08-25 2:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <166092166892.21537.8779448176898902884@vcs2.savannah.gnu.org>
[not found] ` <20220819150749.326DBC0088A@vcs2.savannah.gnu.org>
2022-08-25 2:28 ` Stefan Monnier [this message]
2022-08-25 5:58 ` emacs-28 9c0eec4ed8: * src/window.c (select_window): Fix assert for buffer = non-active minibuffer Eli Zaretskii
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=jwv5yih5acf.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=acm@muc.de \
--cc=emacs-devel@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).