From: David Hansen <david.hansen@gmx.net>
To: emacs-devel@gnu.org
Subject: Re: `split-window-preferred-horizontally'
Date: Sat, 07 Jun 2008 22:16:45 +0200 [thread overview]
Message-ID: <8763sl0zma.fsf@localhorst.mine.nu> (raw)
In-Reply-To: 484A451C.2010408@gmx.at
On Sat, 07 Jun 2008 10:21:48 +0200 martin rudalics wrote:
>> That's how I would like it:
>>
>> If the *frame* is >= 160 chars wide
>>
>> - if it is already (horizontally) split use the *other* window with
>> all the `*-other-window' commands and `display-buffer'
>
> `split-window-preferred-function' should decide if and how to split the
> largest (or most recently used) window offered by `display-buffer'. It
> cannot decide which window to use when _no_ window gets split.
But the commands named `*-other' should obviously use some *other*
window. Actually the term "other window" is pretty well defined via the
command `other-window'.
>> - otherwise split it horizontally.
>>
>> If the *frame* is < 160 chars wide do above with s/horizontally/vertically/
>> (as the default behavior already is).
>
> (defun my-spf (window)
> (if (>= (frame-width (window-frame window)) 120)
> (when (window-full-width-p window)
> (let ((split-width-threshold 120))
> (split-window window nil t)))
> (split-window)))
>
> seems to do what you want with a value of 120 - I can't test 160 here.
(setq split-window-preferred-function #'my-spf)
-> Making completion list...
if: Attempt to split minibuffer window
David
next prev parent reply other threads:[~2008-06-07 20:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 19:44 `split-window-preferred-horizontally' David Hansen
2008-06-06 22:01 ` `split-window-preferred-horizontally' martin rudalics
2008-06-06 22:36 ` `split-window-preferred-horizontally' David Hansen
2008-06-07 8:21 ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 20:16 ` David Hansen [this message]
2008-06-08 13:07 ` `split-window-preferred-horizontally' martin rudalics
2008-06-08 17:49 ` `split-window-preferred-horizontally' David Hansen
2008-06-09 20:54 ` `split-window-preferred-horizontally' David Hansen
2008-06-10 7:54 ` `split-window-preferred-horizontally' martin rudalics
2008-06-10 14:27 ` `split-window-preferred-horizontally' Stefan Monnier
2008-06-07 1:44 ` `split-window-preferred-horizontally' Stefan Monnier
2008-06-07 2:29 ` `split-window-preferred-horizontally' Juanma Barranquero
2008-06-07 8:21 ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 12:46 ` `split-window-preferred-horizontally' Juanma Barranquero
2008-06-07 14:41 ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 8:21 ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 18:23 ` `split-window-preferred-horizontally' Stefan Monnier
2008-06-07 14:36 ` `split-window-preferred-horizontally' martin rudalics
2008-06-07 18:33 ` `split-window-preferred-horizontally' 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8763sl0zma.fsf@localhorst.mine.nu \
--to=david.hansen@gmx.net \
--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.