From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: A better UI than perform-replace Date: Wed, 18 Nov 2015 02:55:48 +0200 Organization: LINKOV.NET Message-ID: <87vb90yum7.fsf@mail.linkov.net> References: <56480D6C.2080408@yandex.ru> <876112xj2i.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447809791 4227 80.91.229.3 (18 Nov 2015 01:23:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Nov 2015 01:23:11 +0000 (UTC) Cc: emacs-devel , Dmitry Gutov To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 18 02:23:02 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 1ZyrSf-00049d-5W for ged-emacs-devel@m.gmane.org; Wed, 18 Nov 2015 02:23:01 +0100 Original-Received: from localhost ([::1]:33196 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyrSe-0003yn-9m for ged-emacs-devel@m.gmane.org; Tue, 17 Nov 2015 20:23:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyrSQ-0003yh-KK for emacs-devel@gnu.org; Tue, 17 Nov 2015 20:22:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyrSP-0006FM-RQ for emacs-devel@gnu.org; Tue, 17 Nov 2015 20:22:46 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:41847 helo=homiemail-a13.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyrSP-0006FG-ML for emacs-devel@gnu.org; Tue, 17 Nov 2015 20:22:45 -0500 Original-Received: from homiemail-a13.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTP id 3678A334072; Tue, 17 Nov 2015 17:22:45 -0800 (PST) Original-Received: from localhost.linkov.net (m91-131-172-22.cust.tele2.ee [91.131.172.22]) (Authenticated sender: jurta@jurta.org) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTPA id 1E84133406F; Tue, 17 Nov 2015 17:22:43 -0800 (PST) In-Reply-To: <876112xj2i.fsf@gmail.com> (Oleh Krehel's message of "Mon, 16 Nov 2015 12:47:01 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 69.163.253.7 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:194685 Archived-At: > 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. It's easy to run 'occur' to display all matches and total match count. > - No good way to pause the replacement procedure. C-r enters recursive edit (C-M-c to get out again). > - No good way to undo a replacement. Undo is implemented in bug#21684. > 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. Good idea. And as addressing your first concern above suggests, the most suitable buffer would be *Occur* itself. It already displays all matches, and what is missing is just what you propose: new keybindings and Dired-like indication on the left edge. In fact, we already have 'occur-edit-mode' acting on *Occur* buffer. So what we could do is to add a similar mode 'occur-replace-mode' that will perform 'automatic-all' on 'C-c C-c'.