From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: A better UI than perform-replace Date: Fri, 20 Nov 2015 20:41:48 -0500 Message-ID: <564FCBDC.2000701@siege-engine.com> References: <56480D6C.2080408@yandex.ru> <876112xj2i.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1448070133 20477 80.91.229.3 (21 Nov 2015 01:42:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Nov 2015 01:42:13 +0000 (UTC) Cc: emacs-devel To: Oleh Krehel , Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 21 02:42:01 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 1ZzxBe-0007u5-G5 for ged-emacs-devel@m.gmane.org; Sat, 21 Nov 2015 02:41:58 +0100 Original-Received: from localhost ([::1]:50711 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzxBe-00023x-0N for ged-emacs-devel@m.gmane.org; Fri, 20 Nov 2015 20:41:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzxBZ-00023Z-EX for emacs-devel@gnu.org; Fri, 20 Nov 2015 20:41:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzxBW-0004Zv-55 for emacs-devel@gnu.org; Fri, 20 Nov 2015 20:41:53 -0500 Original-Received: from mail-yk0-f175.google.com ([209.85.160.175]:34774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzxBW-0004Zr-0Y for emacs-devel@gnu.org; Fri, 20 Nov 2015 20:41:50 -0500 Original-Received: by ykfs79 with SMTP id s79so186466039ykf.1 for ; Fri, 20 Nov 2015 17:41:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=z/TH/5CQ+dbdCKnLFpUYOIdlAT8n5i4SEhYz4JSOrkA=; b=cvlqUxKJT3/lDts+BanORTLA2L+eJRWcmlXwlxN/NqAPd4Ovq/8+xd5gG1FQfwYLYl nIMDnLyJ/frv7MmE5nl5aoEpUUEPl3QbMDk1VUIDRPJJXvB2XIjY09bw2cNbabIOkJdx mxL4+tYJ8OlWoCMvxb79f3wbyqnw2j9PdMBl1B2kilLxYdOiwpmelAfzG3lUBEniTTPX 5zBxjAzlRvPA7+77fNMsHyGsQ8hG72LVXCGFlcs3j21eJw4YkxVvs4WCEfxnqftExudG Gpgpdb9/8g0XWeOgCWnri1PGoo47O9JScOna4JQnR6j2gVxC5LsgYy4Njmx+d2qRfMOW yy/Q== X-Received: by 10.13.253.66 with SMTP id n63mr15602253ywf.163.1448070109360; Fri, 20 Nov 2015 17:41:49 -0800 (PST) Original-Received: from [192.168.1.202] (pool-71-184-198-118.bstnma.fios.verizon.net. [71.184.198.118]) by smtp.googlemail.com with ESMTPSA id z7sm2090881ywf.15.2015.11.20.17.41.48 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Nov 2015 17:41:48 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <876112xj2i.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.160.175 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:194917 Archived-At: On 11/16/2015 06:47 AM, Oleh Krehel wrote: > Dmitry Gutov writes: > >> 5. Feel hugely motivated, and write a better UI for all of that. > > I think a better UI for `perform-replace' is warranted. The current > thing is very basic: > > - No good way to see how many matches there are. > - No good way to get an overview of matches per buffer. > - No good way to pause the replacement procedure. > - No good way to undo a replacement. > > An idea to improve this would be with a permanent *replace* buffer, > similar to `dired' or *Buffer List*. This buffer would be visible during > the replacement operation, together with the actual buffers that contain > the candidates. Here are some ideas for key bindings and the general > interface: You may be interested in the way semantic-symref handles broad renames. The basic workflow is: Place cursor in a declaration you want to rename M-x semantic-symref RET Or use M-x semantic-symref-symbol RET for an arbitrary symbol. You then look through the hits, expand the ones you think are valid, collapse the ones you think aren't valid. Or expand/contract all, of course. Press R to start a rename. Type in the new name. Everything is replaced. If you don't like it, just undo whichever buffer you made a mistake with. Eric ... Following up on interesting things slowly.