[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffe
From: |
martin rudalics |
Subject: |
bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc. |
Date: |
Mon, 25 May 2009 09:04:25 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> It seems (but I'm not sure this works for all cases) that what is
> needed, to ensure that the same window as before is split, is to bind
> `split-window-preferred-function' to something like this around calls
> to `display-buffer':
>
> (lambda (w) (eq w (get-lru-window)))
The function you want might be
(defun split-window-22 (window)
(let ((frame (window-frame window)))
(or (and (setq window (get-largest-window frame t))
(window-full-width-p window)
(window-splittable-p window)
(split-window window))
(and (setq window (get-lru-window frame t))
(window-splittable-p window)
(split-window window)))))
but I wouldn't rely on it.
> Even if this function is not an exact recipe for all cases, something
> like it should be mentioned, to help users get back the behavior that
> existed before the new "smarter" behavior was introduced. Preferably,
> Emacs would itself provide a function that users could use here - a
> function that would give precisely the pre-23 behavior in all cases.
>
> We should also make it clear that if you want the pre-23 behavior then
> you will need to wrap not only explicit calls to `display-buffer' with
> a `let' binding this way, but also calls to things such as
> `with-output-to-temp-buffer'.
All people have to do is customize `split-window-preferred-function' to
that function.
martin
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., Drew Adams, 2009/05/24
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc.,
martin rudalics <=
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., Drew Adams, 2009/05/25
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., martin rudalics, 2009/05/25
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., Stefan Monnier, 2009/05/25
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., martin rudalics, 2009/05/26
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., Drew Adams, 2009/05/26
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., Stefan Monnier, 2009/05/26
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., martin rudalics, 2009/05/27
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., Stefan Monnier, 2009/05/27
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., Drew Adams, 2009/05/27
- bug#3366: 23.0.94; doc of split-window-preferred-function, display-buffer, etc., martin rudalics, 2009/05/27