* bug#60578: xref-query-replace-in-results doesn't replace truncated lines
@ 2023-01-05 17:52 Juri Linkov
2023-01-05 20:10 ` Dmitry Gutov
0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2023-01-05 17:52 UTC (permalink / raw)
To: 60578
1. (setq xref-search-program 'ripgrep)
2. (setq xref-search-program-alist '((ripgrep .
"xargs -0 rg <C> -M 200 --max-columns-preview --null -nH --no-heading --no-messages -g '!*/' -e <R>")))
where "-M 200 --max-columns-preview" is added to default settings.
Then 'C-x p g' shows matches on truncated lines before the text
"[... omitted end of long line]".
But 'r' (xref-query-replace-in-results) skips these matches
that are displayed on truncated lines.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#60578: xref-query-replace-in-results doesn't replace truncated lines
2023-01-05 17:52 bug#60578: xref-query-replace-in-results doesn't replace truncated lines Juri Linkov
@ 2023-01-05 20:10 ` Dmitry Gutov
2023-01-06 7:30 ` Juri Linkov
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Gutov @ 2023-01-05 20:10 UTC (permalink / raw)
To: Juri Linkov, 60578
Hi!
On 05/01/2023 19:52, Juri Linkov wrote:
> 1. (setq xref-search-program 'ripgrep)
> 2. (setq xref-search-program-alist '((ripgrep .
> "xargs -0 rg <C> -M 200 --max-columns-preview --null -nH --no-heading --no-messages -g '!*/' -e <R>")))
>
> where "-M 200 --max-columns-preview" is added to default settings.
> Then 'C-x p g' shows matches on truncated lines before the text
> "[... omitted end of long line]".
>
> But 'r' (xref-query-replace-in-results) skips these matches
> that are displayed on truncated lines.
What if you remove "-M 200 --max-columns-preview" from the invocation
arguments, and instead customize xref-truncation-width to whatever value
you want? E.g. the same -- 200.
Does replacement work then?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#60578: xref-query-replace-in-results doesn't replace truncated lines
2023-01-05 20:10 ` Dmitry Gutov
@ 2023-01-06 7:30 ` Juri Linkov
0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2023-01-06 7:30 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 60578-done
>> 1. (setq xref-search-program 'ripgrep)
>> 2. (setq xref-search-program-alist '((ripgrep .
>> "xargs -0 rg <C> -M 200 --max-columns-preview --null -nH --no-heading --no-messages -g '!*/' -e <R>")))
>> where "-M 200 --max-columns-preview" is added to default settings.
>> Then 'C-x p g' shows matches on truncated lines before the text
>> "[... omitted end of long line]".
>> But 'r' (xref-query-replace-in-results) skips these matches
>> that are displayed on truncated lines.
>
> What if you remove "-M 200 --max-columns-preview" from the invocation
> arguments, and instead customize xref-truncation-width to whatever value
> you want? E.g. the same -- 200.
>
> Does replacement work then?
Thanks for suggestion, I used "-M 200" when even xref-truncation-width
was still quite slow, but now with long-line-optimizations there should
not be such problems anymore. So closing.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-06 7:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-05 17:52 bug#60578: xref-query-replace-in-results doesn't replace truncated lines Juri Linkov
2023-01-05 20:10 ` Dmitry Gutov
2023-01-06 7:30 ` Juri Linkov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).