From: martin rudalics <rudalics@gmx.at>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 11810@debbugs.gnu.org
Subject: bug#11810: 24.1.50; `vc-diff' shrinks pre-existing window
Date: Tue, 03 Jul 2012 09:14:47 +0200 [thread overview]
Message-ID: <4FF29BE7.2030006@gmx.at> (raw)
In-Reply-To: <4FF206F5.4030101@yandex.ru>
> A bit inconsistent, though, isn't it? Stealing space from the lower,
> returning to the upper.
When you resize the selected window you try to steal from/give to the
lower window in order to not clobber the window-start position of the
selected window. When you delete a window you return space to the upper
one because that's where the space usually came from. That's just my
interpretation of the behavior, though.
>> >> (2) When `temp-buffer-resize-mode' is nil and the window size has
>> >> changed, the change was probably due to some manual intervention
>> >> probably needed to see more of a buffer originally present
>> and it
>> >> seems better to leave that change alone.
>>
>> ... in this case we can be sure that the user changed the size so we
>> probably should leave it alone.
>
> That depends on the definition of "the user". In our case, *I* didn't
> explicitly resize the window, `vc-diff' did.
Because of `even-window-heights'? That's something I obviously forgot
to handle when quitting a window. Maybe the best solution is to set the
3rd element of the quit-restore parameter iff either
(1) `temp-buffer-resize-mode' is non-nil, or
(2) `window--even-window-heights' actually did resize the window
and don't do the `temp-buffer-resize-mode' check in `quit-window'.
> How about clearing (or changing) the 'quit-window parameter in each
> command when we're sure that the user won't want to have the size
> restored afterwards?
> There would be a set of "user-facing" functions that would do that.
`adjust-window-trailing-edge' would be an obvious candidate. But which
window's parameter would you clear? Both?
> How will the temp-buffer-resize-mode null check help in this case?
> It's a global minor mode, so it's either t in all buffers, or nil in all
> of them.
That's why I would have set `temp-buffer-resize-mode' buffer-locally to
t. But it's ugly.
>> Don't we? How would the (when resize ...) check affect the rest? And
>> keep in mind that any resize operation has to take into account that the
>> frame configuration or size has changed in the meantime.
>
> Eh, I meant the comparison will blow up, it's above the condition-case:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
> /=(nil 42)
> eval((/= nil 42) nil)
I see. This would have to be fixed anyway if the third element of the
quit-restore parameter is not set in `display-buffer-record-window'.
>> > I'm fine with either behavior (not resizing or properly restoring),
>> but
>> > `vc-diff' is not the only culprit. `vc-log-print' also does the
>> > shrinking, although it's harder to observe.
>>
>> What and where is `vc-log-print'?
>
> Sorry, `vc-print-log'. C-x v l.
It's in `vc-log-internal-common', I see.
>> I don't know. I think a vc-diff buffer should be considerded a
>> temporary buffer, subject to `temp-buffer-resize-mode'. Ideally,
>> windows of non-temporary buffers are never shrunk automatically.
>
> Would a window that displayed a normal buffer previously but which now
> is displaying a temporary buffer be considered a "window of
> non-temporary buffer"?
Only after it displays the normal buffer again. Why did you ask?
martin
next prev parent reply other threads:[~2012-07-03 7:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 19:22 bug#11810: 24.1.50; `vc-diff' shrinks pre-existing window Dmitry Gutov
2012-06-28 22:32 ` Andreas Schwab
2012-06-28 22:45 ` Dmitry Gutov
2012-06-29 7:12 ` Andreas Schwab
2012-06-29 7:12 ` martin rudalics
2012-06-29 22:39 ` Dmitry Gutov
2012-06-30 9:09 ` martin rudalics
2012-06-30 21:34 ` Juanma Barranquero
2012-07-01 9:06 ` martin rudalics
2012-06-30 23:18 ` Dmitry Gutov
2012-07-01 9:06 ` martin rudalics
[not found] ` <4FF05DC0.4080609@yandex.ru>
2012-07-02 7:00 ` martin rudalics
2012-07-02 13:33 ` Dmitry Gutov
2012-07-02 13:33 ` Dmitry Gutov
2012-07-02 16:32 ` martin rudalics
2012-07-02 20:39 ` Dmitry Gutov
2012-07-03 7:14 ` martin rudalics [this message]
2012-07-03 12:48 ` Dmitry Gutov
2012-07-03 16:40 ` martin rudalics
2012-07-03 18:56 ` Dmitry Gutov
2012-07-04 9:18 ` martin rudalics
2012-07-04 16:12 ` Dmitry Gutov
2012-07-05 9:53 ` martin rudalics
2012-07-05 23:19 ` Dmitry Gutov
2012-07-06 6:36 ` martin rudalics
2012-07-06 12:25 ` Dmitry Gutov
2012-07-02 20:39 ` Dmitry Gutov
2012-07-02 16:32 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FF29BE7.2030006@gmx.at \
--to=rudalics@gmx.at \
--cc=11810@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.