|
From: | Dmitry Gutov |
Subject: | bug#44611: Prefix arg for xref-goto-xref |
Date: | Sun, 20 Dec 2020 18:10:15 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Hi Eli, On 20.12.2020 17:43, Eli Zaretskii wrote:
This is an incompatible behavior change, no? If so, I'm not sure we can simply make it.This is what we have the section "Incompatible Editing Changes" in etc/NEWS for.The fact that the section exists doesn't mean we can make incompatible changes whenever we feel like.
It does mean we can make such changes when we discover a better way to do things.
I think you can agree that we have been, overall, fairly conservative with UI changes in Xref.
This key binding existed since Emacs 26.1, so changing it would definitely surprise someone.
In any case, it was one of the minor, later additions. I would be surprised to find out (if it ever were possible to obtain such data) that > 5% of regular Xref users take advantage of it.
And those who do, can discover the change without any terrible consequences (the new binding is pretty benign), look up the docs and adapt.
And since the new keybinding have no disastrous effect, it would safer for the users to adapt to the new keybinding.What disastrous effects? AFAICT, TAB buries the XREF buffer, which is not a disaster. More generally, I think it's wrong to try to make XREF buffers behave like *Grep* buffers. They are different beasts, I think we established this long ago, when Xref was added to Emacs (I think I even made a comment regarding the difference, and Dmitry responded to the effect that this was intended).
While I indeed might have said something like that, it was probably in the context of copying some behavior from Grep that didn't make sense for Xref. This one does (IMO), and, in general, reducing gratuitous differences between packages and UIs we provide is a good thing.
And if things like that will make Xref more palatable to long-time Compilation/Grep aficionados without conflicting with Xref's goals, I'm all in favor of that.
> *XREF* and *Grep* look > differently and behave differently, and it's impossible to make them > be similar enough.If Juri's experience says different, it's a valuable data point. If you recall, we have received a fair number of criticisms for Xref's UI from him over the years.
Finally, the binding in question was added when the Xref buffers for "find definition" and "regexp matches in directory" have (without extra user-specific hacks) behaved the same. This has changed with the introduction of the option xref-show-definitions-function, using which we changed the latter's behavior a little.
I believe we might change xref-show-definitions-function's default soon enough, perhaps even in Emacs 28. xref--show-defs-minibuffer, which we have come up during a recent discussion in emacs-devel, works quite well in my testing for this particular use case (feedback welcome, BTW).
If/when we do, the xref-quit-and-goto-xref binding will lose even more of its importance. Though it should still remain useful on occasion.
[Prev in Thread] | Current Thread | [Next in Thread] |