From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: display-buffer cleverness - how to tame?
Date: Thu, 07 May 2009 11:37:09 +0200 [thread overview]
Message-ID: <4A02ABC5.1030806@gmx.at> (raw)
In-Reply-To: <006501c9ce73$abde6710$c2b22382@us.oracle.com>
> Yes, I read it. No, I don't see any such "step-by-step operative description".
> I'm looking at the latest pretest. If you've updated the manual since then, then
> no, I haven't read your update.
This part was written by Eli and I think it's a splendid example of how
to combine the operational description of the buffer displaying process
with the description of the variables that affect this process. If you
don't see that, then I assure you that I can hardly do any better.
> There is this sentence: "Precisely how `display-buffer' finds or creates a
> window depends on the variables described below." And then the variables are
> described.
At the end of each description Eli explains how the process continues.
> IOW, we say that how it does it what it does depends on the variables. But I
> don't see that "how" or even that "what" described in any "step-by-step
> operative description".
>
> Sorry; it's not clear to me from reading that doc (or the doc strings).
Please give us at least one or two concrete examples.
> Yes, it's there. I can dig out that meaning after several readings. But this
> description of `split-height-threshold' is hard to follow:
>
> "If no window is tall enough, or if the value of
> this variable is `nil', `display-buffer' tries to split some window
> horizontally, subject to restrictions of `split-width-threshold'
> (see below). If splitting horizontally is impossible too,
> `display-buffer' splits a window vertically only if it's the only
> window on its frame and not the minibuffer window, and only if
> `pop-up-windows' is non-`nil'."
>
> If that description is combined with the description of `split-width-threshold',
> then yes, it follows that when both are nil then in most cases no window is
> split. But it takes some digging to get that.
As a matter of fact that happened because I tried to be more concrete.
If I omit such details you'll tell me that you miss them :-(
> So `split-window-preferred-function' is now always a function? That would seem
> to change quite a lot.
Hardly anything.
> Looking at the `window.el' code in the pretest, I cannot imagine what the
> resulting behavior change will be. Will `window--try-to-split-window' always use
> `split-window-preferred-function'?
Yes, provided the frame is splittable.
> Will the default value of that option then be
> some function that calls `window--splittable-p' and takes into account the two
> thresholds somehow? Presumably, but just what/how?...
The default is now the new function `split-window-sensibly' which has
been split off from `window--try-to-split-window'.
> I think I'll wait and see the new code and doc, before trying to figure out the
> behavior.
>
>> >> > If that's not true, then (besides fixing the doc), how can
>> >> > `split-window-preferred-function' prevent window splitting
>> >> > altogether?
>> >>
>> >> With the new code by always returning nil.
>> >
>> > OK. I guess I'll need to try the new behavior, after your
>> > recent changes, before trying to fix my code to make use of
>> > the new `display-buffer'.
>>
>> There won't be any substantial change but the one mentioned above, so
>> you can try it already with the current code.
>
> The current (pretest) code has `split-window-preferred-function' = nil. If that
> won't be nil, then with what default-value function would I replace it, in order
> to "try it" (the new behavior)?
`split-window-sensibly'.
martin
prev parent reply other threads:[~2009-05-07 9:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-04 7:41 display-buffer cleverness - how to tame? Drew Adams
2009-05-04 8:38 ` martin rudalics
2009-05-04 14:39 ` Drew Adams
2009-05-04 15:03 ` Miles Bader
2009-05-04 15:49 ` Drew Adams
2009-05-04 18:58 ` Samuel Bronson
2009-05-05 2:50 ` Miles Bader
2009-05-04 16:36 ` Stefan Monnier
2009-05-04 16:41 ` martin rudalics
2009-05-04 17:13 ` Drew Adams
2009-05-05 7:02 ` martin rudalics
2009-05-05 14:18 ` Drew Adams
2009-05-05 16:33 ` martin rudalics
2009-05-05 16:58 ` Drew Adams
2009-05-05 18:55 ` martin rudalics
2009-05-05 20:20 ` Drew Adams
2009-05-06 16:21 ` martin rudalics
2009-05-06 17:54 ` Drew Adams
2009-05-07 9:37 ` martin rudalics [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A02ABC5.1030806@gmx.at \
--to=rudalics@gmx.at \
--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 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.