* How to append text to end of each line
@ 2013-05-13 17:47 acomber
2013-05-13 17:57 ` acomber
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: acomber @ 2013-05-13 17:47 UTC (permalink / raw)
To: Help-gnu-emacs
I thought this would work:
c-x-% $ -> replace with ABC
But it doesn't find any matches. How can I append a set string at the end
of each line. I specifically want to append "
--
View this message in context: http://emacs.1067599.n5.nabble.com/How-to-append-text-to-end-of-each-line-tp285911.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to append text to end of each line
2013-05-13 17:47 How to append text to end of each line acomber
@ 2013-05-13 17:57 ` acomber
2013-05-13 18:21 ` Kevin Montuori
2013-05-13 18:44 ` Andreas Röhler
2013-05-13 19:03 ` Ken Goldman
2 siblings, 1 reply; 5+ messages in thread
From: acomber @ 2013-05-13 17:57 UTC (permalink / raw)
To: Help-gnu-emacs
But m-x replace-regexp RET $ RET " does work. Why the difference?
--
View this message in context: http://emacs.1067599.n5.nabble.com/How-to-append-text-to-end-of-each-line-tp285911p285913.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to append text to end of each line
2013-05-13 17:57 ` acomber
@ 2013-05-13 18:21 ` Kevin Montuori
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Montuori @ 2013-05-13 18:21 UTC (permalink / raw)
To: Help-gnu-emacs
>>>>> "a" == acomber <deedexy@gmail.com> writes:
a> But m-x replace-regexp RET $ RET " does work. Why the
a> difference?
Odd. Both M-C-% (query-replace-regexp) and M-x replace-regexp work fine
for me. Any chance point was located after the lines you wanted to
operate on when you first tried?
k.
--
Kevin Montuori
montuori@gmail.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to append text to end of each line
2013-05-13 17:47 How to append text to end of each line acomber
2013-05-13 17:57 ` acomber
@ 2013-05-13 18:44 ` Andreas Röhler
2013-05-13 19:03 ` Ken Goldman
2 siblings, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2013-05-13 18:44 UTC (permalink / raw)
To: help-gnu-emacs
Am 13.05.2013 19:47, schrieb acomber:
> I thought this would work:
>
> c-x-% $ -> replace with ABC
>
> But it doesn't find any matches. How can I append a set string at the end
> of each line. I specifically want to append "
>
>
>
>
> --
> View this message in context: http://emacs.1067599.n5.nabble.com/How-to-append-text-to-end-of-each-line-tp285911.html
> Sent from the Emacs - Help mailing list archive at Nabble.com.
>
>
Do you mean M-x query-replace RET...?
That would replace a literal dollar-sign, but not the regexp-symbol for end-of-line.
Therefor you must call M-x query-replace-regexp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to append text to end of each line
2013-05-13 17:47 How to append text to end of each line acomber
2013-05-13 17:57 ` acomber
2013-05-13 18:44 ` Andreas Röhler
@ 2013-05-13 19:03 ` Ken Goldman
2 siblings, 0 replies; 5+ messages in thread
From: Ken Goldman @ 2013-05-13 19:03 UTC (permalink / raw)
To: help-gnu-emacs
On 5/13/2013 1:47 PM, acomber wrote:
> How can I append a set string at the end
> of each line. I specifically want to append "
For infrequently used tasks like this, I just define and execute a
keyboard macro. It's faster than looking up the command in the manual.
E.g.,
- go to the end of the line
- add the character
- go down one line
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-13 19:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-13 17:47 How to append text to end of each line acomber
2013-05-13 17:57 ` acomber
2013-05-13 18:21 ` Kevin Montuori
2013-05-13 18:44 ` Andreas Röhler
2013-05-13 19:03 ` Ken Goldman
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).