From: martin rudalics <rudalics@gmx.at>
To: Jared Finder <jfinder@crypticstudios.com>
Cc: 3142@emacsbugs.donarmstrong.com
Subject: bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically
Date: Tue, 28 Apr 2009 08:29:47 +0200 [thread overview]
Message-ID: <49F6A25B.3050108@gmx.at> (raw)
In-Reply-To: <C73CE12E0E2E6D4AA8C97475050023A60FF541AA62@proserpine.paragon.crypticstudios.com>
> I would expect that split-window-preferred-function would accept
> split-window-horizontally and split-window-vertically.
`split-window-preferred-function', if non-nil, must be a function called
with a WINDOW as single argument. `split-window-vertically' and
`split-window-horizontally' are functions that split the selected window
and take a SIZE argument. Hence, when you set
`split-window-preferred-function' to `split-window-vertically' as you
did you will get a
split-window-vertically: Window height 1 too small (after splitting)
error because you call `split-window-vertically' with a window as
argument, and `prefix-numeric-value' when called with a window as
argument returns 1, a SIZE argument disliked by `split-window'.
Sounds contrived, but I don't have a better explanation.
If you really need `split-window-preferred-function' use
`split-window-vertically' you have to write a wrapper like
(defun my-split-window-function (window)
(with-selected-window window
(split-window-vertically)))
> At the very
> least, there should be an easy way to set this to "always split
> vertically", "always split horizontally", and "intelligently split".
Setting `split-width-threshold' nil for "always split vertically" and
`split-height-threshold' nil for "always split horizontally" should
accomplish that. Can't you use these directly?
martin
next prev parent reply other threads:[~2009-04-28 6:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 1:16 bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically Jared Finder
2009-04-28 6:29 ` martin rudalics [this message]
2009-04-28 17:21 ` Jared Finder
2009-04-28 22:48 ` Juri Linkov
2009-04-29 1:29 ` Stefan Monnier
2009-04-29 7:13 ` martin rudalics
2009-04-29 9:59 ` Juri Linkov
2009-04-29 12:40 ` martin rudalics
2009-04-29 13:50 ` bug#3142: 23.0.92; split-window-prefered-function should be able to usesplit-window-horizontally/split-window-vertically Drew Adams
2009-04-30 9:05 ` martin rudalics
2011-10-05 18:49 ` Glenn Morris
2011-10-05 22:11 ` Stefan Monnier
2009-04-29 15:26 ` bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically Stefan Monnier
2009-04-30 8:54 ` martin rudalics
2009-04-30 11:47 ` Juri Linkov
2009-04-30 18:20 ` Stefan Monnier
2009-05-01 11:54 ` Juri Linkov
2009-05-01 8:33 ` martin rudalics
2009-05-01 11:52 ` Juri Linkov
2009-05-02 8:40 ` martin rudalics
2009-05-05 7:02 ` martin rudalics
2009-05-05 11:03 ` Juri Linkov
2009-05-06 1:41 ` Stefan Monnier
2009-05-06 16:21 ` martin rudalics
2009-05-06 19:04 ` Stefan Monnier
2009-05-07 9:36 ` martin rudalics
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=49F6A25B.3050108@gmx.at \
--to=rudalics@gmx.at \
--cc=3142@emacsbugs.donarmstrong.com \
--cc=jfinder@crypticstudios.com \
/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.