GNU bug report logs - #6385
A slightly less aggressive fit-window-to-buffer

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Wed, 9 Jun 2010 19:05:02 UTC

Severity: wishlist

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 6385 <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 6385 <at> debbugs.gnu.org
Subject: Re: bug#6385: A slightly less aggressive fit-window-to-buffer
Date: Fri, 11 Jun 2010 19:15:25 +0200
On Fri, Jun 11, 2010 at 3:21 PM, martin rudalics <rudalics <at> gmx.at> wrote:
>> I believe fit-window-to-buffer has become a bit upset and unnecessary
>> aggressive because of visual lines. It looks like it need a bit more
>> feedback from the display system to be really sure that the buffer is
>> entirely visible.
>>
>> The attached patch is something I have used to get around the problem.
>> I am not sure it is the right thing but I am rather sure it does not
>> hurt.
>
> IIUC your change defeats the whole point of `pos-visible-in-window-p',
> namely to calculate a position without doing a redisplay.

Yes, I know. I hoped someone had a better idea long term idea. Doing a
redisplay is just a quick fix.

What I saw was the even  2 lines high buffer made fit-window-to-buffer
delete sibling windows. All the time - but... I thought I knew how to
reproduce it. So I did not write any test procedures, I was just a bit
irritated. A mistake.


> Worse even,
> you might end up doing multiple redisplays within a loop.


Yes, I know. Maybe the first redisplay was all that was needed.


> TRT would be to handle the various line cases within `pos_visible_p'.


Thanks, I will leave this for the moment, but keep it in mind.


> And obviously get rid of resizing windows within a loop.
>
>> Of course we need a non-killing version of fit-window-to-buffer, but
>> for the moment this patch might be useful.
>
> What is a "non-killing version of fit-window-to-buffer"?


This function killed all other siblings even if it just actually needs
two lines if certain conditions are met. (Those I tried to describe.)

So this was just a desperate attempt to stop that. I do not know what
to do at the moment. I will try to reproduce this and look a bit
closer at it later.




This bug report was last modified 13 years and 284 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.