[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36967: 27.0.50; Duplicate lines in xref output
From: |
Juri Linkov |
Subject: |
bug#36967: 27.0.50; Duplicate lines in xref output |
Date: |
Thu, 03 Dec 2020 23:30:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>> Here is the patch that makes the broken
>
> Pretty harsh there.
But true: I can't use it in the current form, and was waiting
when someone will fix it.
>> project-find-regexp usable:
>
> Downside: xref-query-replace-in-results won't work in those cases anymore;
> it will only replace one match. Because the list only contains one
> location, and not all of them. And that command is pretty nice to have.
Sorry, I missed this use case because I still know too little about details
of xref.el.
> Here's an alternative proposal:
>
> Combine the lines inside the rendering code instead.
>
> So each xref will have a separate location, but then xref--insert-xrefs
> will see that xref-location-line value repeats across some consecutive
> locations, and will combine them into single line with some text property
> magic (basically, copying the summary from one of them, and then applying
> 'xref-item and 'face properties appropriately). This retains the xref item
> semantics (as opposed to, say, associating an xref item with multiple
> locations). And _hopefully_ the replace-related code won't need
> any changes.
I tried to improve xref--insert-xrefs to group matches by lines
by using the most convenient function seq-group-by. But then
noticed that xref.el doesn't rely on seq.el. Even xref--alistify
that groups matches by files could be replaced by seq-group-by.
Is it a requirement to avoid using seq functions in xref.el?
- bug#36967: 27.0.50; Duplicate lines in xref output, Juri Linkov, 2020/12/02
- bug#36967: 27.0.50; Duplicate lines in xref output, Dmitry Gutov, 2020/12/02
- bug#36967: 27.0.50; Duplicate lines in xref output,
Juri Linkov <=
- bug#36967: 27.0.50; Duplicate lines in xref output, Dmitry Gutov, 2020/12/03
- bug#36967: 27.0.50; Duplicate lines in xref output, Juri Linkov, 2020/12/06
- bug#36967: 27.0.50; Duplicate lines in xref output, Dmitry Gutov, 2020/12/08
- bug#36967: 27.0.50; Duplicate lines in xref output, Dmitry Gutov, 2020/12/09
- bug#36967: 27.0.50; Duplicate lines in xref output, Dmitry Gutov, 2020/12/20