From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: How to replace string for a block? Date: Tue, 26 May 2009 13:44:26 -0700 Message-ID: <38E157F11A7E403CBD77C30A0BC0AAE2@us.oracle.com> References: <1243369356.13000.19.camel@qi.unbc.ca> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243370687 9972 80.91.229.12 (26 May 2009 20:44:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 May 2009 20:44:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "'Lennart Borgman'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 26 22:44:44 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M93Vm-00016h-LL for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2009 22:44:38 +0200 Original-Received: from localhost ([127.0.0.1]:60517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M93Vl-0008JC-RT for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2009 16:44:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M93VN-0008Gs-Ud for help-gnu-emacs@gnu.org; Tue, 26 May 2009 16:44:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M93VJ-0008BM-3X for help-gnu-emacs@gnu.org; Tue, 26 May 2009 16:44:13 -0400 Original-Received: from [199.232.76.173] (port=56919 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M93VI-0008Az-SA for help-gnu-emacs@gnu.org; Tue, 26 May 2009 16:44:08 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:52062) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M93VI-0008Fe-Af for help-gnu-emacs@gnu.org; Tue, 26 May 2009 16:44:08 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4QKhlOM032054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 26 May 2009 20:43:48 GMT Original-Received: from abhmt007.oracle.com (abhmt007.oracle.com [141.146.116.16]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4QKio4c011317; Tue, 26 May 2009 20:44:50 GMT Original-Received: from dradamslap1 (/141.144.90.50) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 26 May 2009 13:44:01 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcneQfdM/lIKxU5VQrKbr/aQYvkSUwAAKQyw X-Source-IP: abhmt007.oracle.com [141.146.116.16] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010205.4A1C5492.0118:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64744 Archived-At: > > Is there a way to perform 'M-x replace-string' only for a block? > > Emacs documentation is your friend. Try to read the > documentation by doing C-h f replace-string > It is possible to do what you want, at least in Emacs 23 > pretest version. It's possible in any Emacs version. Just narrow the buffer to the block first: `C-x n n'. Widen it again after replacing: `C-x n w'.