[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: Sat, 09 Jul 2011 10:45:46 +0200
User-agent: Thunderbird (Windows/20090302)

> We may as well get rid of pop-to-buffer-same-window (those who want to
> provide a LABEL can use pop-to-buffer instead).

I wouldn't object.  The functionality is obviously needed to get rid of
all those

(add-to-list 'same-window-buffer-names (purecopy "*Python*"))

;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*scheme*"))

but if there are any doubts about too many pop-to-buffer-... or
display-buffer-... definitions please let me know.

>> - For those places that intend the "act on the selected window"
>>   behavior---which is the minority---change the code to call
>>   (set-window-buffer (selected-window) buffer), instead of
>>   switch-to-buffer.
> Note that (set-window-buffer (selected-window) buffer) isn't quite good
> enough, since set-window-buffer will be happy to change the buffer of
> a mini-window, whereas callers of switch-to-buffer that want to operate
> on the selected window should signal an error in that case.
> I think adding a `selected-window-only' argument to switch-to-buffer is
> a better solution so callers don't need to worry about such details of
> set-window-buffer.

What precisely would the semantics of this argument be?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]