>>>I believe this should be customizable with something like
>>>
>>>  (setopt display-buffer-alist
>>>   '(("\\*Compile-log\\*" nil (select-window . t))))
>>
>> Thank you for the advice, but I tried this and it didn't work.
>> *Compile-log* buffer isn't selected.
>> I used emacs 29.1 with no init files loaded.
>
>This feature was discussed in bug#33258 and bug#46034,
>but not yet implemented.  It should be easy to implement
>exactly the same way as 'windmove-display-in-direction'
>selects the old or new window in 'post-command-hook'.
>Ok, I will post a patch to bug-gnu-emacs.

There seems to be another problem with using display-buffer-alist.
byte-compile-file repeats byte-compile, display-warning (this uses display-buffer)
for each S-expression. Selecting *Compile-log* buffer before finishing byte-compiling the last
S-expression causes an error. I checked the error using

(defun select-visible-warning-buffer (_type _message &optional _level buffer-name)
  "Select the visible warning buffer"
  (unless buffer-name
    (setq buffer-name "*Warnings*"))
  (let ((window (get-buffer-window (get-buffer buffer-name))))
    (if window (select-window window))))

(advice-add 'display-warning :after #'select-visible-warning-buffer)

, and byte-compile causes "Error: End of file during parsing".

display-buffer-alist should affect every display-buffer, so I think
it leads to the same error.

I think selecting the *Compile-Log* buffer separately from display-buffer
is easier. I made the attached patch to select *Compile-Log* buffer
for emacs 29.1 bytecomp.el.


>> I'll consider a different way.
>
>Until this is pushed, you could use such a simple advice
>that does the same:
>
>(define-advice dired-do-byte-compile (:after (&rest _args) select-window)
>  (when-let ((window (get-buffer-window "*Compile-Log*" 0)))
>    (select-window window)))

Thanks. I referred to this when I made the above patch.