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


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6385 <at> debbugs.gnu.org
Subject: bug#6385: A slightly less aggressive fit-window-to-buffer
Date: Sun, 13 Jun 2010 09:51:34 +0200
> Can't we just throw in a better code instead of fit-window-to-buffer?
> (And rename fit-window-to-buffer to killing-window-fit-to-buffer if
> someone really wants it.)
>
> It does not have to be perfect. Just good enough. We can surely make
> it better later if we need to.

I suppose there's no need for a `killing-window-fit-to-buffer'.  Writing
a non-killing one with Emacs 23 means can be done in a number of ways:

(1) Use `adjust-window-trailing-edge'.  IIRC that's what you already did
    when you wrote your window balancing algorithm so you know how to do
    that.

(2) Save the window configuration and the number of windows around the
    `enlarge-window' call in `fit-window-to-buffer' and restore the
    configuration when a window got deleted.  That's more or less what
    `adjust-window-trailing-edge' does internally.

(3) Adjust enlarge_window so it doesn't delete windows.

Since I don't understand enlarge_window any more I can't give you advice
on (3).  If you want to try (1) or (2) ask me if you encounter problems.

martin




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.