* replace-string for 1 line
@ 2006-08-17 15:07 ld1976
2006-08-17 16:35 ` Drew Adams
0 siblings, 1 reply; 4+ messages in thread
From: ld1976 @ 2006-08-17 15:07 UTC (permalink / raw)
Hello.
Say I want to carry out a replace command, but just for 1 line and not the
rest of the docuemnt, is there a way to do that? I have looked and couldn't
find it.
Thanks,
--
View this message in context: http://www.nabble.com/replace-string-for-1-line-tf2121982.html#a5853003
Sent from the Emacs - Help forum at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: replace-string for 1 line
2006-08-17 15:07 replace-string for 1 line ld1976
@ 2006-08-17 16:35 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2006-08-17 16:35 UTC (permalink / raw)
Say I want to carry out a replace command, but just for 1 line
and not the rest of the docuemnt, is there a way to do that?
If you use transient-mark-mode (I recommend it), then just select the line,
then do the replacement. Many other commands and functions also operate on
the region, if it is active.
If you don't use transient-mark-mode, then narrow to that line: Select the
line, then `C-x n n'. Then do your replacement - only the region is visible,
so only the region is affected. Use `C-x n w' to widen, afterward. To do
this in Emacs Lisp, use `narrow-to-region' and `widen'.
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.5278.1155831504.9609.help-gnu-emacs@gnu.org>]
end of thread, other threads:[~2006-08-17 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-17 15:07 replace-string for 1 line ld1976
2006-08-17 16:35 ` Drew Adams
[not found] <mailman.5278.1155831504.9609.help-gnu-emacs@gnu.org>
2006-08-17 16:38 ` B. T. Raven
2006-08-17 16:40 ` Pascal Bourguignon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).