[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3142: 23.0.92; split-window-prefered-function should be able to use
From: |
martin rudalics |
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 |
User-agent: |
Thunderbird 2.0.0.16 (Windows/20080708) |
> 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
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically, Jared Finder, 2009/04/27
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically,
martin rudalics <=
- 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
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically, Juri Linkov, 2009/04/28
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically, Stefan Monnier, 2009/04/28
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically, martin rudalics, 2009/04/29
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically, Juri Linkov, 2009/04/29
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically, martin rudalics, 2009/04/29
- bug#3142: 23.0.92; split-window-prefered-function should be able to usesplit-window-horizontally/split-window-vertically, Drew Adams, 2009/04/29
- bug#3142: 23.0.92; split-window-prefered-function should be able to usesplit-window-horizontally/split-window-vertically, martin rudalics, 2009/04/30
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically, Stefan Monnier, 2009/04/29
- bug#3142: 23.0.92; split-window-prefered-function should be able to use split-window-horizontally/split-window-vertically, martin rudalics, 2009/04/30