emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shrink-window-if-larger-than-buffer in VC-diff


From: Chong Yidong
Subject: Re: shrink-window-if-larger-than-buffer in VC-diff
Date: Sun, 15 Aug 2010 23:10:07 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Juanma Barranquero <address@hidden> writes:

>> I think the shrink-window-if-larger-than-buffer call in vc-diff-finish
>> shouldn't be there in the first place.  It's well-intentioned, but even
>> in cases less extreme that the above, it can be annoying to resize the
>> user's windows.  Any objection to removing this call?
>
> IMHO, such cases should be made optional (perhaps a global variable
> covering such uses in many/most/all modes?) instead of removed. I
> usually *always* want the shrinking behavior, and rarely reuse the
> window.

As far as I can tell, the only really good uses of s-w-i-l-t-b occur
when the window in question is electric.  For permanent windows, the
behavior seems poor.  Here is another example of it misbehaving, in
finder:

1. M-x finder-by-keyword RET
2. C-x 1
3. Go to "tex" and type RET
4. Go to "tex-mode.el" and RET

   => The upper window, now showing *Finder-package* with an empty
   commentary, is 4 lines tall (due to s-w-i-l-t-b).

5. C-x o
6. Go to "reftex.el" and RET

   => The upper window now shows *Finder-package* with a long verbose
   commentary.  But it is still 4 lines tall, and therefore useless.


I think the existing non-electric uses of s-w-i-l-t-b need to be
reconsidered.  Maybe we should change `pop-to-buffer' so that it accepts
an option to both shrink *and* grow windows.  Then people who want their
windows to resize automagically can use this option, and have it work
more reliably than it does now.  (The default should be to avoid
resizing at all.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]