[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-28 9c0eec4ed8: * src/window.c (select_window): Fix assert for
From: |
Eli Zaretskii |
Subject: |
Re: emacs-28 9c0eec4ed8: * src/window.c (select_window): Fix assert for buffer = non-active minibuffer |
Date: |
Thu, 25 Aug 2022 08:58:50 +0300 |
> 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?