Subject: bug#78835: Wrong pop-to-buffer behavior after one display-buffer-in-side-window call

From: martin rudalics <[email-masked]>
Date: Mon, 14 Jul 2025 09:53:19 +0200

>> Just an update: I've seen the prompt today and moved to step 2 (removed the 'unless horizontal' condition).
 >
 > It didn't seem to help.
 >
 > Here is a screencast which shows me evaluating the new code with eval-buffer (somewhere in the middle of the video), and still seeing the prompt when I repeat a certain sequence of actions:
 >
 > - Show the diff buffer (for window.el), actually.
 > - Quit it with 'q'.
 >
 > BTW, despite me answering the prompt 'n' the width gets adjusted anyway.

The 'y-or-n-p' only serves to tell that 'quit-restore-window' actually
does run this part and the problem is there.  Please make a screenshot
before you type 'y' and a screenshot after you typed it so we can see
what goes on.

BTW, how comes that you didn't get prompted for nearly a month?  Did you
never diff buffers in this time?

 > Hope the link works, if not, I can reupload it somewhere else:
 >
 > https://jumpshare.com/s/cb8wWgizBFmSSF31fsPr

In this image I see a frame with two evenly sized windows.  Is there
anything special I'm supposed to see in it?

Whatever it is - if worse comes to worst we can optionally switch off
any such resizing.  It's here to assure that if you

- work with some well laid-out window configuration,

- temporarily show some other buffer in one of its windows, making that
   window small or large for that purpose,

- quit that window,

then the initial configuration should get restored approximately.
Apparently, that misfires in your case but I yet have no idea why.

martin