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

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

bug#63272: 29.0.90; xref fails on long lines


From: Dmitry Gutov
Subject: bug#63272: 29.0.90; xref fails on long lines
Date: Fri, 5 May 2023 23:49:14 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 05/05/2023 20:50, Juri Linkov wrote:
In the real case the prefix and suffix were unique, so I didn't expect
that in a generated file there was a very long distance between prefix
and suffix.  To limit the distance between prefix and suffix I tried:

   C-x p g prefix.{0,100}suffix

Try escaping { and }:

  C-x p g prefix.\{0,100\}suffix

The regexp needs to use the syntax that Emacs can understand.

Just the subset of it that can be translated to command like, so that Grep and Ripgrep can work with it too.

but xref that uses ripgrep fails to find matches.
So needed to fall back to ripgrep-based rgrep in this case:

   M-x rgrep prefix.{0,100}suffix

that works successfully.

It seems the problem is because of different regexp syntax
used by ripgrep and re-search-forward in xref--collect-matches-1.

The conversion is performed by xref--regexp-to-extended.





reply via email to

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