Subject: bug#28814: [BUMP, PATCH] (26.0.90; When *xref* window is needed, original window-switching intent is lost )

From: Eli Zaretskii <[email-masked]>
Date: Wed, 25 Oct 2017 18:39:42 +0300

> From: [email-masked] (João Távora)
> Cc: Dmitry Gutov <[email-masked]>,  [email-masked]
> Date: Wed, 25 Oct 2017 16:27:13 +0100
> 
> > If so, then the easiest solution IMO would be to pop up one more
> > window, i.e. behave as if the window displaying the XREF buffer didn't
> > exist.  That would both keep the contract of "C-x 4" and leave the
> > XREF buffer visible.
> 
> Yes, this is the default behaviour in the current patches.

Good.  Then I'm happy.

As for when we can't pop up a new window: would it be okay to reuse
the current window only in that (hopefully, rare) case?

> > As for quitting the XREF buffer when it's no longer needed: how about
> > 'q', like other similar modes do, or some variety thereof?  "C-u RET"
> > is too odd, almost outlandish in Emacs.
> 
> ’q’ is already taken by ’quit-window’ in *xref* buffers. It quits the
> window and does nothing else. I’m looking for a command that quits *and*
> goes to the target.

How about 'Q'?

> Then let’s open a separate discussion on whether that behaviour should
> become the default (I think it should).

What behavior should become the default?

The problem with binding this "quit and go to reference" function to
RET is that it is unlike any other similar feature we have: RET
usually selects the item, but does not quit any windows.

> It’s a bugfix, so emacs-26.

I'd need to see the patches in their last incarnation (if you already
posted them, and nothing needs to be changed, a URL will be
appreciated).  In general, this changes user-visible behavior in
non-trivial ways, so it's borderline between a bugfix and a new
feature.  But if the patches are small and simple enough, I guess they
could be okay for emacs-26.

Thanks.