Subject: bug#49057: 28.0.50; windmove-display-in-direction ignores windmove-display-no-select

From: Juri Linkov <[email-masked]>
Date: Fri, 18 Jun 2021 22:10:02 +0300

>> But wouldn't this be too confusing for users, when users will call
>> `pop-to-buffer' with the new alist entry 'select', and it still will select
>> the unintended window as `pop-to-buffer' currently does?
>
> `pop-to-buffer' has to select the window chosen by `display-buffer'
> regardless of whether `display-buffer' selected it or not.  Do we
> violate this principle anywhere?  The basic difference I'd propose is to
> have `pop-to-buffer' bind
>
>  (display-buffer-overriding-action '(nil ((select . t))))
>
> around the `display-buffer' call and so `display-buffer' will select the
> chosen window regardless of any user customizations.

Then other commands should take care to not override
display-buffer-overriding-action.

Do you intend to rewrite commands that currently use
switch-to-buffer-other-window (such as Buffer-menu-other-window
and dired-find-file-other-window) to use `display-buffer'
with '(nil ((select . t)))?  Probably not because
switch-to-buffer-other-window already uses pop-to-buffer.

Then maybe you want to rewrite commands that currently use
`display-buffer' with ACTION=t (such as
Buffer-menu-switch-other-window and dired-display-file)
to use `display-buffer' with '(nil ((select . nil))) instead?