[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: switch-to-buffer: for interactive use only

From: Chong Yidong
Subject: Re: switch-to-buffer: for interactive use only
Date: Fri, 08 Jul 2011 22:35:32 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Juanma Barranquero <address@hidden> writes:

>> So, if creating a new window is the wrong thing for bs-cycle-next, it
>> should be bs-cycle-next that changes---e.g. by changing from
>> switch-to-buffer to set-window-buffer---not everything else in Emacs.
> I don't remember saying that it is the rest of Emacs which must be
> changed; only that there are two different use cases, and we must
> cater to both.

Fair enough.  So, I propose the following:

- Make switch-to-buffer basically do
  (pop-to-buffer buffer-or-name 'same-window norecord label)

- Make pop-to-buffer-same-window an alias for switch-to-buffer.
  (This means to add an optional LABEL arg to switch-to-buffer, for
  consistency with pop-to-buffer-same-window.)

- Remove the "interactive use only" flag from switch-to-buffer.

- 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

How's that?

reply via email to

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