From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Doing search and replace via *grep* buffer Date: Fri, 16 Feb 2007 09:51:16 +0100 Message-ID: <86bqjujxiz.fsf@lola.quinscape.zz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1171615936 18734 80.91.229.12 (16 Feb 2007 08:52:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2007 08:52:16 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" To: "Chris Moore" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 16 09:52:09 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HHyp3-0005Pl-Ek for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2007 09:52:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHyp2-00031N-E1 for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2007 03:52:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HHyom-00030y-1Q for emacs-devel@gnu.org; Fri, 16 Feb 2007 03:51:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HHyok-00030S-Fg for emacs-devel@gnu.org; Fri, 16 Feb 2007 03:51:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHyok-00030O-Bl for emacs-devel@gnu.org; Fri, 16 Feb 2007 03:51:46 -0500 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HHyoj-0005PP-Kp for emacs-devel@gnu.org; Fri, 16 Feb 2007 03:51:46 -0500 Original-Received: from quinscape.de (pd95b0fdb.dip0.t-ipconnect.de [217.91.15.219]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id JAA28205 for ; Fri, 16 Feb 2007 09:51:43 +0100 X-Delivered-To: Original-Received: (qmail 29480 invoked from network); 16 Feb 2007 08:51:42 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 16 Feb 2007 08:51:42 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id E8F3F23889; Fri, 16 Feb 2007 09:51:16 +0100 (CET) In-Reply-To: (Chris Moore's message of "Thu\, 15 Feb 2007 15\:04\:48 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66455 Archived-At: "Chris Moore" writes: > On 2/15/07, Kim F. Storm wrote: > >> Then hit / and type the replacement text: >> / newtext RET >> >> Now, still in the *grep* buffer, move to the next instance you want >> to modify, and just hit . to repeat the replacement, for example: >> n n . n . n . n n n . >> >> (I suppose VI users will find this very familiar). > > vi users are used to / being used to search, not to replace. and 'N' > is the key for 'previous match', not 'p'. The interface you offer > here is similar enough to how things work in vi to confuse people. > Also, while using 'n' and 'p' to go up and down, there's no finger > available to press '.'; some other choice of key would be better. > > How about 'r' to prompt for replacement text and do a replacement, and > 'g' to do it a(g)ain on a different line? The left hand easily > reaches 'r' and 'g' while the right hand is touching 'n' and 'p'. We don't want to design new keybindings. I explained previously how to do this in a manner that does not require the user to learn completely new keybindings. And anyway, Richard already said to save this discussion for after the release. -- David Kastrup