[From emacs-devel] >>> 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. > > 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. Here is the patch that allows using (select-window . t) in display-buffer-alist to select the displayed window, and (select-window . nil) to deselect windows selected by such functions as pop-to-buffer: