From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <118c4316-9179-c9dd-e7d1-97b96921d922@yandex.ru> References: <86d1owl682.fsf@yandex.ru> <87inyoxpz8.fsf@mail.linkov.net> <8760unxaoi.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1462824694 14153 80.91.229.3 (9 May 2016 20:11:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 May 2016 20:11:34 +0000 (UTC) Cc: 23484@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 09 22:11:22 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1azrWM-00049b-HC for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 May 2016 22:11:14 +0200 Original-Received: from localhost ([::1]:43221 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azrWL-0002IY-BL for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 May 2016 16:11:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azrWD-0002CD-Cl for bug-gnu-emacs@gnu.org; Mon, 09 May 2016 16:11:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azrWA-0001cr-12 for bug-gnu-emacs@gnu.org; Mon, 09 May 2016 16:11:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azrW9-0001cl-Tn for bug-gnu-emacs@gnu.org; Mon, 09 May 2016 16:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1azrW9-0003LW-QF for bug-gnu-emacs@gnu.org; Mon, 09 May 2016 16:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 May 2016 20:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23484-submit@debbugs.gnu.org id=B23484.146282462612822 (code B ref 23484); Mon, 09 May 2016 20:11:01 +0000 Original-Received: (at 23484) by debbugs.gnu.org; 9 May 2016 20:10:26 +0000 Original-Received: from localhost ([127.0.0.1]:44729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azrVa-0003Kj-6Y for submit@debbugs.gnu.org; Mon, 09 May 2016 16:10:26 -0400 Original-Received: from mail-wm0-f41.google.com ([74.125.82.41]:37370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1azrVY-0003KT-4J for 23484@debbugs.gnu.org; Mon, 09 May 2016 16:10:24 -0400 Original-Received: by mail-wm0-f41.google.com with SMTP id a17so206255954wme.0 for <23484@debbugs.gnu.org>; Mon, 09 May 2016 13:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=vs+gisCgEG8shRAb3z5IMApXpXhZQ6ZWZGHBlYzwr1M=; b=M+vfTS+SlQN2GMYai/0zxep0MqWv/NA92tFNy5nQVNZJb3/F5whi35AtGveqSvc8Wg jDqSgz4QB+Mu/wUWCwLqG7Az8NI92Ei0+1u0gdbq4uE9bc1kBqMFUt74zTibGlVRzE6l BcsBWlD8AvWTtIi3NK6W1VlTtSYBqxkmZTo4ey2PVZwhQ7QDpRuZCsPI0OTFhzPEi1Rl XE/TSqM2suXVZJ++OO6HRGSo6WzBsEKAkRyTofIn9QKvRfYsfYbm5nCveD2nqMBwVZ4A j6nEZtKuyRMTkXCiOf5eJmkgmPL2aw/xPJ8mQ5AIXfDpa+3xfFEbVVxYWJYvHdCD8HdG 2FZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=vs+gisCgEG8shRAb3z5IMApXpXhZQ6ZWZGHBlYzwr1M=; b=C+hbOGMkGh7fCQdHmXgZQfzU6KKE3IY/nETekBYk5HvkIbEBjsApptOz9x+/OCnlmP KV/vrPhkuby3iinECQuJbGObXO5vFS1Mc8C1HSPdG3/2fcEYwA3B6b1cVmc7kgNw2sSx n2ayZ++0OIE9TOpa1X7P1IBVCqvan7b5N96S12fI4NX7bUqZUdf1I91Fg07IMRbLyFUa 9NxC41V9iwly87Ed75+/uzmm/KAUEmFkfdLKOZeouyAydxQ6uzlBTbPw5vx+kZ50NUXJ xztpWzGUM4qEsFF8PR33OuzjonwUkFRFFwg0wS0hwq1HwWrFfkBzYI4nGeENhkP+fZm/ XZcg== X-Gm-Message-State: AOPr4FXcxmlX+ShCAzSvlsmA6UniQGey9Cet3SGZXRrcponEEW59bKVyah3HNNfP4qbKiw== X-Received: by 10.28.139.137 with SMTP id n131mr12636690wmd.13.1462824617832; Mon, 09 May 2016 13:10:17 -0700 (PDT) Original-Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id vu4sm32864974wjc.27.2016.05.09.13.10.16 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 May 2016 13:10:17 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1 In-Reply-To: <8760unxaoi.fsf@mail.linkov.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118038 Archived-At: 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.