From: martin rudalics <rudalics@gmx.at>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: Resizing windows after display-buffer
Date: Mon, 25 Apr 2011 10:35:18 +0200 [thread overview]
Message-ID: <4DB53246.7040600@gmx.at> (raw)
In-Reply-To: <BANLkTi=PwiFVKVDz9JrFVP8OfZ4YWqT5bg@mail.gmail.com>
> In my everyday use, I display the buffer I'm working on (code, a text
> file, whatever) in a full window; the only time that the window is
> split is for temporary or secondary uses; for example, help windows,
> occur output, ielm, an inferior mode (python, lisp, etc.), re-builder,
> bs-show, etc; and I make sure that the "secondary" buffer goes always
> to the bottom window and that window is resized to fit the buffer or
> have a height limit (typically about a third of the frame height).
I suppose the `fit-window-to-buffer' feature should probably depend on
the buffer name much like the options `same-window-buffer-names' or
`special-display-buffer-names' so a user can choose the set of buffers
where the windows should fit. (I know that the variable can be made
buffer-local but the customization mechanism doesn't support that.)
> If
> I switch to the bottom window and do something that would cause the
> top window to display another buffer (multi-occur, for example, or
> selecting a new buffer from bs-show), I *don't* want the top window to
> be resized.
This means the `fit-window-to-buffer' scheme should probably only apply
to new windows. In the case you describe we have also to observe things
like `even-window-heights' whose interaction with `fit-window-to-buffer'
seems yet unresolved at the moment. Likely `fit-window-to-buffer'
should prevail, but should we, for example, even sizes when both buffers
are to large to fit the window?
> So, in my case, a setting that would make every display-buffer to try
> to fit is much worse than a minor mode that I can call from whatever
> mode hook I like.
We already have a defcustom like `dired-shrink-to-fit'. Also note that
`temp-buffer-resize-mode' only applies to the `display-buffer' call
itself. Thereafter, it does not have any effect - changing the size of
characters or the text of the buffer doesn't trigger resizing of the
window. Hence calling this a mode seems a bit exaggerated.
So the question is why you think that activating a minor mode from a
mode hook is more convenient than setting an option from that hook.
martin
next prev parent reply other threads:[~2011-04-25 8:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-24 23:45 Resizing windows after display-buffer Chong Yidong
2011-04-25 0:09 ` Juanma Barranquero
2011-04-25 8:35 ` martin rudalics [this message]
2011-04-25 13:00 ` Juanma Barranquero
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DB53246.7040600@gmx.at \
--to=rudalics@gmx.at \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).