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

From: Gregory Heytings <[email-masked]>
Date: Sat, 06 Mar 2021 22:55:22 +0000

>
> Ah, ok. If ripgrep can do this as well, it would be more general (a good 
> thing).
>

Yes, indeed.

>
> Note that it mentions the following in the description of its -b 
> argument:
>
>  If ripgrep does transcoding, then the byte offset is in terms of the
>  the result of transcoding and not the original data. This applies
>  similarly to another transformation on the source, such as
>  decompression or a --pre filter. Note that when the PCRE2 regex engine
>  is used, then UTF-8 transcoding is done by default.
>

As the manpage mentions, this transcoding is done by default _only_ when 
the PCRE2 regex engine is used, that is, when ripgrep was built with PCRE2 
(the Debian package for example is built without PCRE2) and when the 
--pcre2 flag is passed.  And even in that case it is possible to disable 
the transcoding with --no-encoding.