bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Dmitry Gutov
Subject: bug#44611: Prefix arg for xref-goto-xref
Date: Mon, 28 Dec 2020 02:54:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 27.12.2020 20:21, Eli Zaretskii wrote:
This works both ways: if you want TAB to do something other than its
default, you can rebind it for you, right?
This is not about my personal preferences.
Your original explanation of the rationale was that you always press
TAB because you are used to it in Grep buffers.

Avoiding unnecessary ad-hoc differences is not just about any personal preference.

That contradicts what Dmitry said: that the current Xref UI moves away
of the completion UI, and towards compilation-mode and grep-mode.
There, deleting the window with C-j will look odd, I think.
There are two modes: xref-show-xrefs and xref-show-defs.
xref-show-xrefs is similar to grep, whereas xref-show-defs
resembles the Completion UI where C-j makes sense.
AFAIU, Dmitry didn't like the proposal to have different bindings in
these two modes.

Two buffers that look exactly the same shouldn't behave differently. I think it's just basic usability.

What we could do instead, is change the default value of xref-show-xrefs-function to use some new function that would use a new major mode with the (slightly) new bindings which you have discussed with Juri.

And *also* change the default value of xref-show-definitions-function to one of the alternative functions, which already behave in some notably different way than xref--show-xref-buffer.

I'm not sure what we would buy with such a combination, however, given that it will create an bigger difference in behavior than simply changing a key binding (*). But the latter change in the default seems to be a Good Thing either way. Maybe we should put it to a vote.

(*) I guess you might like that the user could customize xref-show-definitions-function back to a value where TAB behaves like it did in Emacs 27? Although they could change the key binding back just as well with a couple of line of Emacs Lisp, one can't do that via Customize.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]