[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: switch-to-buffer: for interactive use only
From: |
martin rudalics |
Subject: |
Re: switch-to-buffer: for interactive use only |
Date: |
Wed, 13 Jul 2011 19:18:02 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> I'm not so concerned about display-buffer-function; it's up to the users
> of that to DTRT. As for display-buffer-alist, we can bind it to nil
> within switch-to-buffer.
I think that we want two types of `switch-to-buffer' functions:
(1) The one where using any window but the selected doesn't make sense.
This seems the case for C-x b and maybe a few other cases. We could
use a `set-window-buffer' based function here and error out if the
selected window is strongly dedicated or the minibuffer window.
Call this function `switch-to-buffer-same-window' and bind C-x b to
it. This function would be marked as not callable from Elisp.
(2) A function that pops to a buffer, preferably in the selected window.
This is the case for almost all other calls of `switch-to-buffer'.
For this we could rewrite `switch-to-buffer' to call `pop-to-buffer'
with the 'same-window argument and, if Stefan insists, make it reuse
the same window even if it's weakly dedicated. This function would
be callable from Elisp.
Anything wrong with this approach?
martin
- Re: switch-to-buffer: for interactive use only, (continued)
- Re: switch-to-buffer: for interactive use only, martin rudalics, 2011/07/11
- Re: switch-to-buffer: for interactive use only, Chong Yidong, 2011/07/09
- Re: switch-to-buffer: for interactive use only, martin rudalics, 2011/07/10
- Re: switch-to-buffer: for interactive use only, Chong Yidong, 2011/07/10
- Re: switch-to-buffer: for interactive use only, martin rudalics, 2011/07/10
- Re: switch-to-buffer: for interactive use only, Stefan Monnier, 2011/07/10
- Re: switch-to-buffer: for interactive use only, Chong Yidong, 2011/07/11
- Re: switch-to-buffer: for interactive use only, Stefan Monnier, 2011/07/12
- Re: switch-to-buffer: for interactive use only, martin rudalics, 2011/07/12
- Re: switch-to-buffer: for interactive use only, Chong Yidong, 2011/07/13
- Re: switch-to-buffer: for interactive use only,
martin rudalics <=
- Re: switch-to-buffer: for interactive use only, Chong Yidong, 2011/07/13
- Re: switch-to-buffer: for interactive use only, martin rudalics, 2011/07/09
Re: switch-to-buffer: for interactive use only, grischka, 2011/07/13