Subject: bug#33870: 27.0.50; xref-goto-xref not configurable

From: Dmitry Gutov <[email-masked]>
Date: Thu, 27 Dec 2018 15:20:22 +0200

On 27.12.2018 2:05, João Távora wrote:
> You can read up the whole bug here:
> 
>      https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28814
> 
> I quote from that thread:
> 
>      Here are two very simple Emacs -Q recipes that demonstrate [the bug]

Does this work well for everybody?

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index c71802c918..85d4325d9e 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -494,7 +494,8 @@ xref--show-pos-in-buf
              (or (and (window-live-p xref--original-window)
                       xref--original-window)
                  (selected-window))
-          (display-buffer buf action))
+          (pop-to-buffer buf action)
+          (selected-window))
        (xref--goto-char pos)
        (run-hooks 'xref-after-jump-hook)
        (let ((buf (current-buffer)))