M-: (setq windmove-display-no-select t)
M-x windmove-display-right
C-x b *scratch*
The new window will be selected independently of the value of
windmove-display-no-select.
Sometimes the new buffer is displayed in the current buffer ignoring
windmove-display-right (when *scratch* is already on the right for
example).
Please also do:
M-: (setq switch-to-buffer-obey-display-actions t)
What we could do to improve this:
1. enable switch-to-buffer-obey-display-actions by default;
2. mention switch-to-buffer-obey-display-actions in more docstrings.
Currently the docstring of windmove-display-in-direction has this text:
"When `switch-to-buffer-obey-display-actions' is non-nil,
`switch-to-buffer' commands are also supported."
Maybe the same text should be copied to all commands that use
windmove-display-in-direction, i.e. to windmove-display-right,
etc.