From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Chris Moore" Newsgroups: gmane.emacs.devel Subject: Re: Doing search and replace via *grep* buffer Date: Thu, 15 Feb 2007 15:04:48 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1171614206 13687 80.91.229.12 (16 Feb 2007 08:23:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2007 08:23:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 16 09:23:18 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 1HHyN3-0000Eq-NA for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2007 09:23:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHyN3-0001YB-7W for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2007 03:23:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HHhEC-0004Es-9k for emacs-devel@gnu.org; Thu, 15 Feb 2007 09:04:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HHhEA-0004CP-Mi for emacs-devel@gnu.org; Thu, 15 Feb 2007 09:04:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHhEA-0004Br-88 for emacs-devel@gnu.org; Thu, 15 Feb 2007 09:04:50 -0500 Original-Received: from nf-out-0910.google.com ([64.233.182.190]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HHhE9-00045z-Lg for emacs-devel@gnu.org; Thu, 15 Feb 2007 09:04:49 -0500 Original-Received: by nf-out-0910.google.com with SMTP id h2so1209488nfe for ; Thu, 15 Feb 2007 06:04:48 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ox+yn0Brie1o0dyf2qosxKIeTGUF8fC31UKuMrSj1qa1yvnmWIgTlRFZ/t0WjBiYh2jWuSX+rWV8TyxctwMLIZuLrIKc1xCKvVSt+Q6LPMlTshG3i1b9pIqUBgr63hu6+dcUFCsGHLmIp6V2DshgSnA//tUFhmP5DdGuK+cbBc8= Original-Received: by 10.82.187.16 with SMTP id k16mr2835319buf.1171548288270; Thu, 15 Feb 2007 06:04:48 -0800 (PST) Original-Received: by 10.82.179.3 with HTTP; Thu, 15 Feb 2007 06:04:48 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) X-Mailman-Approved-At: Fri, 16 Feb 2007 03:22:24 -0500 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:66452 Archived-At: 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'.