GNU bug report logs - #23484
25.1.50; undo doesn't work properly in xref-query-replace-in-results

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sun, 8 May 2016 19:07:01 UTC

Severity: normal

Found in version 25.1.50

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>
Cc: 23484 <at> debbugs.gnu.org
Subject: Re: bug#23484: 25.1.50; undo doesn't work properly in
 xref-query-replace-in-results
Date: Mon, 9 May 2016 23:10:15 +0300
On 05/09/2016 11:01 PM, Juri Linkov wrote:

> Why not using an original search string instead of ‘.*’ thus avoiding
> tricks with isearch-filter-predicate/replace-re-search-function?

A few reasons:

- We don't actually save it.
- Being able to replace _any_ regexp inside the matches is a feature 
(though maybe it's not going to be very popular).
- We're replacing the given list of matches, not all regexp occurrences.

> perform-replace will have no problem finding the same matches
> as found by xref.

That's not true, xref is not limited by Grep is regexp searching in the 
ways that its results are found.

E.g. xref-find-references is not necessarily the result of a regexp 
search. The default implementation is a bit basic, but different 
backends can implement smarter logic (so that the search takes into 
account the context at point, and only returns the uses of the local 
variable within its scope, or only method calls, etc). We'll still want 
to be able to replace them.




This bug report was last modified 9 years and 36 days ago.

Previous Next


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