From: Juanma Barranquero <lekktu@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: Resizing windows after display-buffer
Date: Mon, 25 Apr 2011 15:00:33 +0200 [thread overview]
Message-ID: <BANLkTinNVrXz7HJ_UFULLd9xdDi8W_F5vA@mail.gmail.com> (raw)
In-Reply-To: <4DB53246.7040600@gmx.at>
On Mon, Apr 25, 2011 at 10:35, martin rudalics <rudalics@gmx.at> wrote:
> 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.
Yes.
> 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.
In my case `even-window-heights' is set to nil quite soon in .emacs :-)
> Likely `fit-window-to-buffer'
> should prevail, but should we, for example, even sizes when both buffers
> are to large to fit the window?
I cannot answer that, because I haven't ever thought about
`even-window-heights' == t.
> 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.
In most cases, I'm not worried about not resizing the window after
creation; many modes do not require it (help,occur, ielm, inferior
interpreters), and for those that I want, I use an advice or a hook to
call fit-window-to-buffer. But it would be nice to have a true
minor-mode, of course.
> 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.
If by "setting an option from that hook" you mean setting a local
variable in the buffer before it is displayed, then I'm OK.
Juanma
prev parent reply other threads:[~2011-04-25 13:00 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
2011-04-25 13:00 ` Juanma Barranquero [this message]
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=BANLkTinNVrXz7HJ_UFULLd9xdDi8W_F5vA@mail.gmail.com \
--to=lekktu@gmail.com \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/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).