From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: A better UI than perform-replace (was: Rename refactoring, or something like that) Date: Tue, 17 Nov 2015 17:57:16 -0500 Message-ID: References: <56480D6C.2080408@yandex.ru> <876112xj2i.fsf@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: plane.gmane.org Content-Type: text/plain; charset=Utf-8 X-Trace: ger.gmane.org 1447801063 6966 80.91.229.3 (17 Nov 2015 22:57:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Nov 2015 22:57:43 +0000 (UTC) Cc: emacs-devel@gnu.org, dgutov@yandex.ru To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 17 23:57:38 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZypBw-0000bX-6i for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 23:57:36 +0100 Original-Received: from localhost ([::1]:60997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZypBv-00033A-Ea for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 17:57:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZypBj-00032q-G1 for emacs-devel@gnu.org; Tue, 17 Nov 2015 17:57:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZypBi-0006zM-DC for emacs-devel@gnu.org; Tue, 17 Nov 2015 17:57:23 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZypBd-0006xg-6m; Tue, 17 Nov 2015 17:57:17 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZypBc-0007Oz-Hl; Tue, 17 Nov 2015 17:57:16 -0500 In-reply-to: <876112xj2i.fsf@gmail.com> (message from Oleh Krehel on Mon, 16 Nov 2015 12:47:01 +0100) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194674 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > - No good way to pause the replacement procedure. You can do that easily by typing any ordinary editing command, or ESC. To resume, use C-x ESC ESC RET. > - No good way to undo a replacement. Yes there is: type C-_ (C-- on an X terminal). Nonethless, I can see how your new mode might be useful. But the *replace* buffer might also get in the way. I think we should poll the users before changing the default behavior. We could ask them to suggest changes in the new feature as well as to say whether they want it as the default. > To re-describe things in a shorter way, *replace* should be a staging > area for the `perform-replace' operation. I see a possible pitfall here. It seems to envision finding all the matches before operating on any of them. Currently, if you pause and resume the query replace loop, it resumes starting from point and it finds all matches in the current text after point. So if during he pause you edited something below, creating or eliminating matches, it operates on the matches that exist after those changes. But if the list of matches was made in advance, it won't understand that the buffer has changed. It can double-check the old matches to make sure they still match, but it will ignore newly introduced matches. -- Dr Richard Stallman President, Free Software Foundation (gnu.org, fsf.org) Internet Hall-of-Famer (internethalloffame.org) Skype: No way! See stallman.org/skype.html.