GNU bug report logs -
#11810
24.1.50; `vc-diff' shrinks pre-existing window
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Thu, 28 Jun 2012 19:28:02 UTC
Severity: normal
Found in version 24.1.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 05.07.2012 13:53, martin rudalics wrote:
> > I tried it with just my patch applied, and it didn't work, because in
> > this case the stored height value was of already resized window:
> > `display-buffer-record-window' is called from `window--display-buffer',
> > and `display-buffer-use-some-window' calls `window--even-window-heights'
> > before `window--display-buffer'.
>
> I think we could do
>
> (when window
> (prog1
> (window--display-buffer buffer window 'reuse)
> (window--even-window-heights window)))
>
> in `display-buffer-use-some-window'.
That should work, but IMO `even-window-heights' behavior is just too
surprising (with its conditions on window positions), so, if you don't
mind, I'll open another bug with proposal to change its default value,
presenting the above as alternative.
> > Until then, the issue is somewhat alleviated by the fact that you can
> > press 'z' or 'C-x k' instead of 'q', and both of these won't trigger
> > height restoration.
>
> I'm more concerned with the fact that an application might reuse the
> shrunk window via `display-buffer'.
In this case, unless the new buffer is the same as the one already
displayed in the shrunk window, `display-buffer-record-window' will
overwrite the 'quit-restore parameter, so I don't see what the problem
scenario would be. Hadn't managed to reproduce one either.
> > If someone wants `shrink-window-if-...' to have no effect only in
> > `vc-diff', well, that's a different goal.
>
> But that's probably what some people want.
I don't think we've seen a request exactly like that yet, but that would
require a vc-prefixed variable.
Asynchronous `with-output-to-temp-buffer' proposal is better in that regard.
> >> Let's close this thread as follows: Remove the
> `temp-buffer-resize-mode'
> >> check in `quit-window' and add an integerp check for the third element.
> >
> > Agreed.
>
> Can you install it? Else please post the patch and a ChangeLog entry.
Nope. Is unified diff okay?
window.el (quit-window): Always restore window height when it's saved in
quit-restore parameter.
-- Dmitry
[quit-window.diff (text/plain, attachment)]
This bug report was last modified 12 years and 362 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.