all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: How to replace string for a block?
Date: Wed, 27 May 2009 10:56:24 +0200	[thread overview]
Message-ID: <7cmy8y6i13.fsf@pbourguignon.anevia.com> (raw)
In-Reply-To: mailman.7863.1243370655.31690.help-gnu-emacs@gnu.org

"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__


  parent reply	other threads:[~2009-05-27  8:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 20:22 How to replace string for a block? Wu, Kejia
2009-05-26 20:38 ` Lennart Borgman
2009-05-26 20:44   ` Drew Adams
     [not found]   ` <mailman.7863.1243370655.31690.help-gnu-emacs@gnu.org>
2009-05-27  8:56     ` Pascal J. Bourguignon [this message]
2009-05-27 12:36       ` Alan Mackenzie
     [not found]       ` <mailman.7904.1243427777.31690.help-gnu-emacs@gnu.org>
2009-05-27 12:51         ` Barry Margolin
2009-05-27 15:44           ` Alan Mackenzie
2009-05-27 17:37             ` Andreas Röhler
2009-05-27 17:26           ` Vagn Johansen
2009-05-28  1:03             ` Barry Margolin
     [not found]           ` <mailman.7922.1243439002.31690.help-gnu-emacs@gnu.org>
2009-05-28  0:55             ` Transient mark mode (was Re: How to replace string for a block?) Barry Margolin
2009-05-27 13:35       ` How to replace string for a block? Drew Adams
2009-05-26 21:56 ` Wu, Kejia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cmy8y6i13.fsf@pbourguignon.anevia.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.