Subject: bug#67993: Selecting buffer automatically

From: Juri Linkov <[email-masked]>
Date: Fri, 12 Jan 2024 09:46:16 +0200

>> This is what I see with the current patch:
>>
>> 1.
>> (let ((display-buffer-alist '(("1" nil (select-window . nil)))))
>>    (delete-other-windows) (split-window) (split-window) (balance-windows)
>>    (pop-to-buffer (get-buffer-create "1"))
>>    (pop-to-buffer (get-buffer-create "2")))
>>
>> then the original window remains selected.
>
> But this means that the customization for "1" affects popping to "2".
> If this is the intended effect, it should be documented.

But actually the customization for "1" doesn't affect popping to "2"
because pop-to-buffer still selects windows and creates such layout:

  *scratch*
  Buffer "1"
  Buffer "2"

Only post-command-hook selects the original window afterwards
instead of leaving the buffer "2" selected.