help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to replace string for a block?


From: Pascal J. Bourguignon
Subject: Re: How to replace string for a block?
Date: Wed, 27 May 2009 10:56:24 +0200
User-agent: Gnus/5.101 (Gnus v5.10.10) Emacs/22.2 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> writes:

>> > 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'.

There's no need to narrow the buffer: just set the mark and the point
and M-x replace-{string,regexp} won't go beyond, as documented.  Well,
you've activated transient-mark-mode, of course.  Who would disable it?

-- 
__Pascal Bourguignon__


reply via email to

[Prev in Thread] Current Thread [Next in Thread]