From: martin rudalics <rudalics@gmx.at>
To: Stephen Berman <stephen.berman@gmx.net>, 410@emacsbugs.donarmstrong.com
Cc: emacs-pretest-bug@gnu.org
Subject: bug#410: 23.0.60; display-buffer regression
Date: Sat, 14 Jun 2008 11:40:30 +0200 [thread overview]
Message-ID: <4853920E.9020106@gmx.at> (raw)
In-Reply-To: <873anhkn4m.fsf@escher.local.home>
> The recent reimplementation of display-buffer in lisp resulted in the
> following changed behavior, which I consider a regression:
>
> 1. emacs -Q
>
> 2. M-x calendar
> ==> The window is vertically split, the *scratch* buffer above and
> the Calendar buffer is below in a smaller window sized to fit.
>
> 3. M-: (pop-to-buffer (get-buffer "*Messages*"))
> ==> Now the *Messages* buffer is above and the Calendar buffer is
> still below, but the windows are evenly split, i.e. the Calendar
> window is no longer sized to fit but is too big. Prior to the
> reimplementation of display-buffer doing this step did not change the
> height of the Calendar window.
>
> The behavior in step 3 results from the invocation of
> window--even-window-heights in the last clause of the cond in
> display-buffer, which happens because the *Messages* buffer exits but is
> not displayed. If the sexp in step 3 contained *scratch* instead of
> *Messages*, the height of the Calendar window would not have changed.
Thanks for noticing this.
> Looking at the pre-reimplementation source of Fdisplay_buffer, it looks
> like the window heights should get evened out just as in the lisp
> reimplementation; nevertheless, this is not what happens in the above
> recipe with the older code.
It's because in the Elisp code I evened window heights whenever they
were not equal. The original code evened heights only when the height
of the window to display BUFFER-OR-NAME was less than that of the
selected window. I've tried to restore the original behavior. Please
try again.
I'd like to make the window code resilient in a way that applications
like calendar can naturally set `window-size-fixed'. As a consequence,
`display-buffer' wouldn't change the calendar window's size even it were
larger than the new window. Setting `window-size-fixed' can currently
result in unexpected behavior. Fixing this is non-trivial.
Also I'd like to give `split-height-threshold' and `window-min-height'
buffer-local semantics and maybe add a `window-max-height' variable so
to do `fit-window-to-buffer' and `shrink-window-if-larger-than-buffer'
implicitly during each window configuration change. `window-min-height'
equalling `window-max-height' for a particular buffer would then imply
`window-size-fixed' for that buffer.
Eventually, a user should be able to change window configurations
arbitrarily with the calendar window always keeping its original size
(unless there's no other way, obviously).
martin
next prev parent reply other threads:[~2008-06-14 9:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 22:04 bug#410: 23.0.60; display-buffer regression Stephen Berman
2008-06-14 9:40 ` martin rudalics [this message]
2008-06-14 15:31 ` window-size constraints (was: bug#410: 23.0.60; display-buffer regression) Stefan Monnier
2008-06-14 22:06 ` window-size constraints martin rudalics
2008-06-15 2:01 ` Stefan Monnier
2008-06-15 8:37 ` martin rudalics
2008-06-14 22:34 ` bug#410: 23.0.60; display-buffer regression Stephen Berman
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=4853920E.9020106@gmx.at \
--to=rudalics@gmx.at \
--cc=410@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@gnu.org \
--cc=stephen.berman@gmx.net \
/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.