GNU bug report logs - #60578
xref-query-replace-in-results doesn't replace truncated lines

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 5 Jan 2023 17:57:02 UTC

Severity: normal

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60578 in the body.
You can then email your comments to 60578 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#60578; Package emacs. (Thu, 05 Jan 2023 17:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 05 Jan 2023 17:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: xref-query-replace-in-results doesn't replace truncated lines
Date: Thu, 05 Jan 2023 19:52:59 +0200
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60578; Package emacs. (Thu, 05 Jan 2023 20:11:01 GMT) Full text and rfc822 format available.

Message #8 received at 60578 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>, 60578 <at> debbugs.gnu.org
Subject: Re: bug#60578: xref-query-replace-in-results doesn't replace
 truncated lines
Date: Thu, 5 Jan 2023 22:10:07 +0200
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?




Reply sent to Juri Linkov <juri <at> linkov.net>:
You have taken responsibility. (Fri, 06 Jan 2023 07:32:02 GMT) Full text and rfc822 format available.

Notification sent to Juri Linkov <juri <at> linkov.net>:
bug acknowledged by developer. (Fri, 06 Jan 2023 07:32:03 GMT) Full text and rfc822 format available.

Message #13 received at 60578-done <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 60578-done <at> debbugs.gnu.org
Subject: Re: bug#60578: xref-query-replace-in-results doesn't replace
 truncated lines
Date: Fri, 06 Jan 2023 09:30:04 +0200
>> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 03 Feb 2023 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.