bug#81636: Fix switch-to-buffer-other-*

Sean Whitton <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Juri Linkov [17/Aug  8:34pm +03] wrote:
>> But then 'C-x 4 b *Messages* RET', 'C-x 5 b *Messages* RET',
>> 'C-x t b *Messages* RET' do a wrong unexpected thing,
>> contrary to the definitions of these commands.
>>
>> So let's fix them, but only for interactive uses,
>> because calling them from other commands should still
>> respect the user customization.  For example, the command
>> 'dictionary' directly calls 'switch-to-buffer-other-window'.
>> It still should show the buffer in the same window when
>> 'display-buffer-alist' is customized to do this.
>
> It seems that the option 'switch-to-buffer-obey-display-actions'
> has no relevance here?  Despite the documentation speaking about
> "switch-to-buffer commands":
>
>   When `switch-to-buffer-obey-display-actions' is non-nil,
>   `switch-to-buffer' commands are also supported.
>
> I don't remember, but it seems these "switch-to-buffer commands"
> are commands that call 'switch-to-buffer', but not the commands
> that share the same name prefix 'switch-to-buffer-...'?
> Because 'switch-to-buffer-other-...' commands don't call
> 'switch-to-buffer'.

Arguably the option should affect those commands too.  But it's probably
not ever useful for it to do that?  If that's right, it doesn't need to.

> Therefore what we can do here it to add a new 'interactive' arg
> to all commands whose names end with the suffixes '-other-window',
> '-other-frame', '-other-tab'.  Here is an example for two commands:

This approach makes sense to me.

-- 
Sean Whitton
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.