From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>, Tassilo Horn <tsdh@gnu.org>
Cc: 20189@debbugs.gnu.org
Subject: bug#20189: 25.0.50; Feature request: Alternative split-window-sensibly functions
Date: Wed, 25 Mar 2015 09:23:55 +0100 [thread overview]
Message-ID: <5512709B.9080003@gmx.at> (raw)
In-Reply-To: <83384uqqao.fsf@gnu.org>
> My understanding of the current logic is that 'display-buffer' is
> generally used for short-lived windows that are intended to be deleted
> a short time after the split.
`display-buffer' is, for example, used in `find-file-other-window' so
it's also used for making long-lived windows.
>> (1) That version would prefer horizontal splits as above.
>>
>> (2) I want either horizontal or vertical splitting but not both, i.e.,
>> the layout should always be Nx1 or 1xN windows.
>>
>> (3) A window may get split horizontally not if it's wider/taller than
>> `split-width-threshold'/`split-height-threshold' but instead when
>> its width/height *after* the split followed by `balance-windows'
>> is larger than or equal to (/ split-{width,height}-threshold 2).
>>
>> (4) The single-window exception of `split-height-threshold' still
>> holds, so in frames with just one window a vertical split is
>> performed even though that window is actually too small according
>> to the rules above.
>
> Maybe I misunderstand, but doesn't (2) contradict (1)?
I don't think so. Tassilo just prefers side-by-side windows, if the
frame dimensions permit them.
> And why is (1) a good idea anyway? Why not have a more optimal split,
> whereby (for example) the larger dimension is preferred?
`display-buffer' proposes to split the largest window first. This
choice cannot be influenced by `split-window-preferred-function'.
Although the latter may deliberately try to split another window
instead.
> It is also possible that in some cases the caller of
> split-window-sensibly could provide the requested dimensions in
> advance.
The `window-width' and `window-height' alist members of `display-buffer'
can be used to provide them.
martin
prev parent reply other threads:[~2015-03-25 8:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 9:18 bug#20189: 25.0.50; Feature request: Alternative split-window-sensibly functions Tassilo Horn
2015-03-24 10:51 ` martin rudalics
2015-03-24 11:39 ` Tassilo Horn
2015-03-24 13:30 ` martin rudalics
2015-03-24 14:59 ` Tassilo Horn
2015-03-25 8:23 ` martin rudalics
2015-03-25 9:41 ` Tassilo Horn
2015-03-26 10:58 ` martin rudalics
2015-03-26 11:01 ` Tassilo Horn
2015-03-26 13:47 ` martin rudalics
2015-03-26 14:18 ` Stefan Monnier
2015-03-26 14:31 ` martin rudalics
2015-03-27 18:26 ` Stefan Monnier
2015-03-26 15:15 ` Tassilo Horn
2015-03-26 16:04 ` martin rudalics
2015-03-24 17:05 ` Eli Zaretskii
2015-03-25 7:00 ` Tassilo Horn
2015-03-25 8:24 ` martin rudalics
2015-03-25 17:25 ` Eli Zaretskii
2015-03-25 19:33 ` Tassilo Horn
2015-03-25 19:38 ` Eli Zaretskii
2015-03-26 4:27 ` Tassilo Horn
2015-03-26 10:58 ` martin rudalics
2015-03-26 16:29 ` Eli Zaretskii
2015-03-25 8:23 ` 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
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=5512709B.9080003@gmx.at \
--to=rudalics@gmx.at \
--cc=20189@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=tsdh@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).