Subject: bug#44611: Prefix arg for xref-goto-xref

From: Juri Linkov <[email-masked]>
Date: Fri, 25 Dec 2020 11:20:19 +0200

>> With further development of the search commands based on xref, more
>> users perceive it as a grep replacement, that however is not based
>> on grep mode, so this is a good reason to make xref keybindings more
>> compatible with grep mode.
>
> You didn't answer my question why not use the format we use in *grep*
> buffers or *occur* buffers.

Sorry, I don't know an answer to this question.  But fortunately
Dmitry answered your question.

> That's not what I meant: I meant to leave the TAB binding for now at
> what it is now, while declaring it obsolete in NEWS, and provide an
> alternative for it that will remain when we rebind TAB to another
> command.  But the rebinding of TAB will have to wait until after Emacs
> 28.  That's the meaning of "obsolete": we don't remove it right away,
> but first warn users to get prepared for a removal in the future.

Big corporations don't afraid making much more fundamental changes
that affect billions of users.  For example, on smartphone OS
they can do such a change that on the Task list the same gesture
will remove the wrong task than on older versions.  Also major sites
with billions of users often change their UI completely without hesitation.

So I don't understand such extreme precautions.  Unlike the above examples,
in Emacs everything is configurable, so you can easily add to the init file:

  (define-key xref--xref-buffer-mode-map (kbd "TAB") #'xref-quit-and-goto-xref)

But having no command bound to TAB is a lose-lose situation because
users of grep-like xref commands will have less compatible keys.

> And why C-j?  That's LFD, a key more suitable for acting on something
> at point, not quitting the buffer.

The initial xref UI was closer to completion UI, so C-j makes it consistent
with icomplete mode for users who still perceive xref as completion UI.

> Why not 'q' (for "quit") or 'b' (for "bury")?

'xref-quit-and-goto-xref' also jumps to xref, not only quits,
but 'q' and 'b' should only quit.