Subject: Re: bug#44502:

From: [email-masked]
Date: Fri, 19 Aug 2022 19:10:50 +0300

Salute, Alan, Eli.

> Hello, Eli.
>
> On Fri, Aug 19, 2022 at 13:45:57 +0300, Eli Zaretskii wrote:
>> Ping!  Any progress with this bug?
>
> I haven't been able to reproduce the bug, but understand fairly well what
> must have caused it.
>
> I also haven't heard back from the OP since sending him a proposed patch
> last Sunday.

If OP is myself :-), then I have not patched my emacs waiting first for
the assert. Has not come back yet.

Cheers,

Andrei

>
> Since the patch is fairly simple and obvious, also non-dangerous, how
> about just installing it on the release branch?
>
>> > I think the following fix to the assert should indeed be a "safe" fix,
>> > suitable for Emacs-28.  Could you possibly apply it, please, and try to
>> > recreate the error.  If you don't manage to recreate the error, the bug
>> > is probably "fixed".
>
>> > 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