Subject: Re: bug#1806: dired-pop-to-buffer in wrong place

From: martin rudalics <[email-masked]>
Date: Wed, 29 Apr 2009 09:13:24 +0200

> This might be good for post-23.1, but the reported annoyance is still here,
 > so we need just to restore the old 22.1 behavior of `dired-pop-to-buffer'.
 >
 > Martin, do you think this is possible without reverting `dired-pop-to-buffer'
 > to pre-December 2008 state, and making necessary changes in window.el
 > thus providing the same behavior that was in `dired-pop-to-buffer'?

`dired-pop-to-buffer' could bind `split-window-preferred-function' to a
function that tries to always split the selected window instead of
whatever window was chosen by `display-buffer' but that would override
any user customizations of `split-window-preferred-function'.

We could also provide a variable `split-window-preferred-window', nil by
default, which the window choosing mechanism of `display-buffer' would
respect if bound to some live window.  And we could turn this variable
into an option (now or later).

martin