* Re: emacs-28 9c0eec4ed8: * src/window.c (select_window): Fix assert for buffer = non-active minibuffer [not found] ` <20220819150749.326DBC0088A@vcs2.savannah.gnu.org> @ 2022-08-25 2:28 ` Stefan Monnier 2022-08-25 5:58 ` Eli Zaretskii 0 siblings, 1 reply; 2+ messages in thread From: Stefan Monnier @ 2022-08-25 2:28 UTC (permalink / raw) To: Alan Mackenzie; +Cc: emacs-devel 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: emacs-28 9c0eec4ed8: * src/window.c (select_window): Fix assert for buffer = non-active minibuffer 2022-08-25 2:28 ` emacs-28 9c0eec4ed8: * src/window.c (select_window): Fix assert for buffer = non-active minibuffer Stefan Monnier @ 2022-08-25 5:58 ` Eli Zaretskii 0 siblings, 0 replies; 2+ messages in thread From: Eli Zaretskii @ 2022-08-25 5:58 UTC (permalink / raw) To: Stefan Monnier; +Cc: acm, emacs-devel > From: Stefan Monnier <monnier@iro.umontreal.ca> > Cc: emacs-devel@gnu.org > Date: Wed, 24 Aug 2022 22:28:38 -0400 > > > - 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. The original problem happened during a call to prepare_menu_bars (see the discussion and the data in bug#44502). How does it make sense to signal an error in that scenario? ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-25 5:58 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <166092166892.21537.8779448176898902884@vcs2.savannah.gnu.org> [not found] ` <20220819150749.326DBC0088A@vcs2.savannah.gnu.org> 2022-08-25 2:28 ` emacs-28 9c0eec4ed8: * src/window.c (select_window): Fix assert for buffer = non-active minibuffer Stefan Monnier 2022-08-25 5:58 ` Eli Zaretskii
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).