From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>
Cc: 'Chong Yidong' <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r103444: * lisp/facemenu.el (list-colors-display): Use with-help-window (Bug#8048).
Date: Tue, 01 Mar 2011 18:43:25 +0100 [thread overview]
Message-ID: <4D6D303D.30601@gmx.at> (raw)
In-Reply-To: <61F0B545542B4829A17083130C0065EF@us.oracle.com>
> IIUC what the intention is, it assumes that the user wants to fit the buffer to
> the window and not vice versa. In my case (dedicated window in a separate
> frame), I do not want the buffer display to expand to fill the window. Instead,
> I want it to remain as compact as practical, and I then fit the frame to the
> buffer.
We are talking about `with-output-to-temp-buffer' based macros here
which (1) erase the buffer, (2) fill it (in the body) with some text,
and (3) call `display-buffer'. If you "fit the frame to the buffer" in
a separate fourth step, nothing would change for the particular case you
describe. However, if you do something like
(let ((special-display-buffer-names special-display-buffer-names))
(with-help-window buffer
(with-current-buffer buffer
(insert text)
(setq special-display-buffer-names ...))))
and specify the frame's height for `special-display-buffer-names' from
the height of the buffer, things would change. But you can still resize
the frame in a separate step. The more annoying problem is how to
constrain the window splitting behavior. Currently you can write
(let ((split-height-threshold split-height-threshold))
(with-help-window buffer
(with-current-buffer buffer
(insert text)
(setq split-height-threshold
(* (count-lines (point-min) (point-max)) 2)))))
thus modulating the window splitting behavior of `display-buffer'. If
we display the buffer _before_ filling it, you can't do such things any
more.
> Since there can be different user preferences and use cases, can you please
> provide for those too when designing such a change (e.g. for the default case)?
> IOW, let's not just assume that the window size is to be fixed and
> predetermined, and that the buffer text should be fit to that window size.
martin
next prev parent reply other threads:[~2011-03-01 17:43 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1Ptqqn-0006fU-TE@internal.in.savannah.gnu.org>
2011-02-28 4:15 ` [Emacs-diffs] /srv/bzr/emacs/trunk r103444: * lisp/facemenu.el (list-colors-display): Use with-help-window (Bug#8048) Juanma Barranquero
2011-02-28 9:28 ` martin rudalics
2011-02-28 12:34 ` Juanma Barranquero
2011-02-28 14:57 ` Stefan Monnier
2011-02-28 17:10 ` martin rudalics
2011-02-28 18:39 ` Chong Yidong
2011-02-28 19:43 ` Eli Zaretskii
2011-02-28 19:58 ` Chong Yidong
2011-02-28 20:53 ` Johan Bockgård
2011-03-01 3:40 ` Chong Yidong
2011-03-01 4:53 ` Stefan Monnier
2011-03-01 18:51 ` Eli Zaretskii
2011-03-02 8:09 ` martin rudalics
2011-03-02 18:43 ` Eli Zaretskii
2011-03-02 19:56 ` martin rudalics
2011-03-04 17:49 ` Tom Tromey
2011-03-05 12:00 ` martin rudalics
2011-03-02 17:03 ` Stefan Monnier
2011-03-02 18:51 ` Eli Zaretskii
2011-03-01 21:43 ` Chong Yidong
2011-03-01 9:47 ` martin rudalics
2011-03-01 15:23 ` Drew Adams
2011-03-01 17:43 ` martin rudalics [this message]
2011-03-01 19:00 ` Eli Zaretskii
2011-03-01 21:42 ` Chong Yidong
2011-03-01 22:19 ` Eli Zaretskii
2011-03-02 8:09 ` martin rudalics
2011-03-02 0:13 ` Juanma Barranquero
2011-03-02 8:09 ` martin rudalics
2011-03-02 8:09 ` martin rudalics
2011-02-28 20:57 ` Eli Zaretskii
2011-03-05 12:00 ` martin rudalics
2011-03-06 5:22 ` Stefan Monnier
2011-03-06 9:13 ` martin rudalics
2011-03-06 19:44 ` Stefan Monnier
2011-03-07 10:16 ` martin rudalics
2011-03-07 16:38 ` Stefan Monnier
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=4D6D303D.30601@gmx.at \
--to=rudalics@gmx.at \
--cc=cyd@stupidchicken.com \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
/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).