[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__
- How to replace string for a block?, Wu, Kejia, 2009/05/26
- Re: How to replace string for a block?, Lennart Borgman, 2009/05/26
- RE: How to replace string for a block?, Drew Adams, 2009/05/26
- Message not available
- Re: How to replace string for a block?,
Pascal J. Bourguignon <=
- Re: How to replace string for a block?, Alan Mackenzie, 2009/05/27
- RE: How to replace string for a block?, Drew Adams, 2009/05/27
- Message not available
- Re: How to replace string for a block?, Barry Margolin, 2009/05/27
- Re: How to replace string for a block?, Alan Mackenzie, 2009/05/27
- Re: How to replace string for a block?, Andreas Röhler, 2009/05/27
- Re: How to replace string for a block?, Vagn Johansen, 2009/05/27
- Re: How to replace string for a block?, Barry Margolin, 2009/05/27
- Message not available
- Transient mark mode (was Re: How to replace string for a block?), Barry Margolin, 2009/05/27
Re: How to replace string for a block?, Wu, Kejia, 2009/05/26