[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch: prefer-window-split-horizontally
From: |
Tassilo Horn |
Subject: |
Re: Patch: prefer-window-split-horizontally |
Date: |
Wed, 15 Aug 2007 07:35:24 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
Juri Linkov <address@hidden> writes:
Hi Juri,
> What do you think about adding another variable
> `split-window-function' with the default value
> `split-window-vertically' or nil with the same meaning, and the
> possible other value `split-window-horizontally'? This would be like
> setting `ediff-split-window-function' to `split-window-horizontally'.
>
> Since this value will hold a function we can set it to any function
> that implements different heuristics to decide how to split the
> window: whether to take into account the window size or the window
> name, etc.
I would be happy with that, too. Well, I think it's even better. But
we really should come up with some mechanism to utilize the widescreen
displays computers nowadays have.
I think your approach would do that. This example function would split
horizontally as long as all windows are 80 or more columns wide.
--8<---------------cut here---------------start------------->8---
(defun th-split-window-function ()
(save-window-excursion
(save-excursion
(split-window-horizontally)
(balance-windows)
(if (>= (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))) 80)
'split-window-horizontally
'split-window-vertically))))
--8<---------------cut here---------------end--------------->8---
Would you try to implement that?
Bye,
Tassilo
Re: Patch: prefer-window-split-horizontally, Juri Linkov, 2007/08/14
- Re: Patch: prefer-window-split-horizontally,
Tassilo Horn <=
Re: Patch: prefer-window-split-horizontally, Richard Stallman, 2007/08/15
Re: Patch: prefer-window-split-horizontally, Stefan Monnier, 2007/08/15
- Re: Patch: prefer-window-split-horizontally, Tassilo Horn, 2007/08/15
- Re: Patch: prefer-window-split-horizontally, Stefan Monnier, 2007/08/15
- Re: Patch: prefer-window-split-horizontally, Tassilo Horn, 2007/08/16
- Re: Patch: prefer-window-split-horizontally, Stefan Monnier, 2007/08/16
- Re: Patch: prefer-window-split-horizontally, Tassilo Horn, 2007/08/16