Subject: 27.0.50; pop-to-buffer in next-error-no-select
From: Juri Linkov <[email-masked]>
To: [email-masked]
Date: Sun, 02 Sep 2018 01:32:12 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Suppose we have such customization:

  (setq display-buffer-alist '(("\\`\\*grep\\*\\'" display-buffer-same-window)))

Now after running grep with a non-empty output in ‘emacs -Q’,
typing ‘C-o’ (compilation-display-error) will display two identical
buffers instead of displaying the buffer with the found grep hit.

The problem is with pop-to-buffer in next-error-no-select.
I wonder what is an idiomatic way to ensure a buffer is already
displayed in some window, to not display the same buffer
in other window?