all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Cadilhac <michael.cadilhac@lrde.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Yet another rookie question replace-regexp
Date: Wed, 08 Mar 2006 11:40:45 +0100	[thread overview]
Message-ID: <8764mpqkwi.fsf@mahaena.lrde> (raw)
In-Reply-To: <1141744185.942210.153740@i40g2000cwc.googlegroups.com> (billy's message of "7 Mar 2006 07:09:46 -0800")

"billy" <bp1497@att.com> writes:

> I know how to use this on a whole file. but how can I make this work on
> a region?
> If I want to comment out a 50 lines of 10k I don't want to comment out
> each line one at a time.  I would like to do C-space bar them move
> below the last line I want to effect, the do the replace-regexp.  But
> his does the whole file.  I pass it  ^ / #

,----[ C-h f replace-string RET ]
| replace-string is an interactive compiled Lisp function in `replace.el'.
| (replace-string from-string to-string &optional delimited start end)
| 
| Replace occurrences of from-string with to-string.
| [...]
| In Transient Mark mode, if the mark is active, operate on the contents
| of the region.  Otherwise, operate from point to the end of the buffer.
| [...]
| 
| [back]
`----

  In other words, you just have to activate the Transient Mark while
  selecting your region.

  In Emacs CVS it's done temporarily by hitting C-space twice.

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |   )\._.,--....,'``.
123 av. de Fontainebleau | 08.70.65.13.14 |  /.  _.. \   _\  (` ._,.
94270 Le Kremlin Bicetre | 06.23.20.31.30 | '._.-(,_..'--(,_...`-..'

      parent reply	other threads:[~2006-03-08 10:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-07 15:09 Yet another rookie question replace-regexp billy
2006-03-07 16:07 ` Albert Reiner
2006-03-07 16:33 ` Hans-Christoph Wirth
2006-03-08 22:56   ` kgold
2006-03-11 17:10     ` Stefan Monnier
2006-03-08 10:40 ` Michael Cadilhac [this message]

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=8764mpqkwi.fsf@mahaena.lrde \
    --to=michael.cadilhac@lrde.org \
    --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.