Subject: bug#7822: 24.0.50; `fit-window-to-buffer': take display artefacts into account

From: Lennart Borgman <[email-masked]>
Date: Wed, 12 Jan 2011 18:55:47 +0100

On Wed, Jan 12, 2011 at 4:11 PM, Drew Adams <[email-masked]> wrote:
>> To be more clear: I was taking into account to few windows. All
>> windows below and above must be taken into account.
>
> I don't see why _any_ windows should be taken into account.  The window for the
> buffer should be resized to fit the displayed buffer, period.  If that is not
> possible for some reason, then we decide what to do.

Hm. Just because you have to actually do the resizing and that affects
other windows and a decision has to be made how?

> For that decision, I would imagine that we decide the same way we decide now
> when you try to resize a window to size S and that is not possible.  Why is this
> case any different from other resizing cases?

Do we really have good ways to easily solve this? Maybe I am missing
something? Perhaps you have some specific suggestion for how to do
this? Which functions do you think supply the needed features?

> AFAICT, all that's involved here is to determine the desired window size.
> Beyond that, there should be nothing new.

One little detail of course: It should not delete other windows. (If
you allow it do delete other windows there are much simpler
implementations than the one I am suggesting. Much simpler.)