GNU bug report logs - #44611
Prefix arg for xref-goto-xref

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 13 Nov 2020 08:33:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>, Juri Linkov <juri <at> linkov.net>
Cc: joaotavora <at> gmail.com, 44611 <at> debbugs.gnu.org
Subject: bug#44611: Prefix arg for xref-goto-xref
Date: Thu, 24 Dec 2020 23:38:52 +0200
On 24.12.2020 05:36, Eli Zaretskii wrote:

> Why does project-find-regexp need to use Xref for displaying the hits?
> why not use Grep-like display we use in *grep* buffers?

These days the default Xref buffer is pretty much Grep-like. Certainly 
much closer to grep-mode than it had been in the first versions. That 
old UI was a lot more completion-like in its behavior.

This happened gradually, after we have addressed feedback from you and 
other users, so that xref-find-references and project-find-regexp behave 
 more in a fashion that you would expect from it. And those 
expectations were surely informed by Grep and other built-in modes.

Why not use something else "Grep-like"? Well, one objective reason is 
Xref is the only UI we have which is rendered programmatically based on 
a list of standardized values representing matches. Anything else would 
need work done for this to happen. And Xref has more features:

- It has a "replace in matches" command.
- Its UI with grouping by file names saves horizontal space, and it's 
actually how Grep-like search tools look these days (see ag, pt or 
ripgrep). GNU Grep doesn't have an option for such output format, so we 
help it in Elisp.
- Finally, its UI presenter is customizable, so anyone who doesn't like 
it can plug in something else that can interpret a list of "xref match" 
values. That is a good thing.




This bug report was last modified 4 years and 31 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.