From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: improving query-replace and query-replace-regexp Date: Sun, 30 May 2004 00:15:00 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87k6yvorzf.fsf@mail.jurta.org> References: <20040528.182035.197345599.wl@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1085865604 29222 80.91.224.253 (29 May 2004 21:20:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 May 2004 21:20:04 +0000 (UTC) Cc: wl@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat May 29 23:19:58 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BUBFG-0002Mu-00 for ; Sat, 29 May 2004 23:19:58 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BUBFG-0007Sd-00 for ; Sat, 29 May 2004 23:19:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BUBFM-0002cb-Ag for emacs-devel@quimby.gnus.org; Sat, 29 May 2004 17:20:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BUBFG-0002cW-As for emacs-devel@gnu.org; Sat, 29 May 2004 17:19:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BUBFE-0002cK-PW for emacs-devel@gnu.org; Sat, 29 May 2004 17:19:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BUBFE-0002cH-NA for emacs-devel@gnu.org; Sat, 29 May 2004 17:19:56 -0400 Original-Received: from [66.33.219.19] (helo=spoon.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BUBDl-0007xg-3m; Sat, 29 May 2004 17:18:25 -0400 Original-Received: from mail.jurta.org (80-235-40-64-dsl.mus.estpak.ee [80.235.40.64]) by spoon.dreamhost.com (Postfix) with ESMTP id 4E47813D894; Sat, 29 May 2004 14:18:21 -0700 (PDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sat, 29 May 2004 13:02:43 -0400") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:24195 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24195 Richard Stallman writes: > After a M-%, you should already be able to continue the same query-replace > action with: M-% RET > > That sounds like an acceptable feature. I don't think an empty > argument to M-% makes any other sense. I like the idea to make M-% to repeat the last query-replace more easily, because C-x ESC ESC is too inconvenient way to do that. But an empty argument to M-% can't be used to repeat query-replace because the first argument of query-replace makes sense even when it is empty. It can be used to insert a replacement string between all characters, i.e. to change a string like "abcdef" into ";a;b;c;d;e;f;" by (query-replace "" ";"). This is an infrequent operation but still makes sense. There should be a better solution like already proposed M-% M-% with the second M-% typed in the minibuffer. -- Juri Linkov http://www.jurta.org/emacs/