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: Alan Mackenzie
Subject: Re: How to replace string for a block?
Date: Wed, 27 May 2009 12:36:58 +0000
User-agent: Mutt/1.5.9i

Hi, Pascal!

On Wed, May 27, 2009 at 10:56:24AM +0200, Pascal J. Bourguignon wrote:
> "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?

I would.  Actually, I have.  transient-mark-mode is an ill thought out
conflation of several logically unrelated features, some of which have
names which can only have been thought up when their namers were smoking
something soothing, complicated to use, and utterly at variance with
Emacs's ethos of elegant simplicity and keeping out of the user's way.

Some people seem to like it, though.  ;-)

> __Pascal Bourguignon__

-- 
Alan Mackenzie (Nuremberg, Germany).




reply via email to

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