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

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

bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.e


From: Dmitry Gutov
Subject: bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el
Date: Sat, 6 Mar 2021 14:44:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 03.03.2021 23:06, Gregory Heytings wrote:


With your approach we'll have to deal with interpreting Grep outputs which list every line in the searched files. This will almost certainly be slower in the case when there are only handful of matches. But benchmarks welcome.


I don't know what you exactly need (I don't (yet?) use project), so I can't elaborate further or provide benchmarks alas.

The same code is also used in the default implementation of xref-find-references, in case you ever tried it.

Could you perhaps tell me what you need?

We are discussing changes to xref.el, because project-find-regexp delegates a lot of its logic to it.

Check out xref-matches-in-files and xref--convert-hits which it calls at the end. What you're thinking of seems to require a Grep-specific version of xref--convert-hits logic, which in the end constructs specialized xref items with a new type of location (alternative to xref-file-location).





reply via email to

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