[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding String to Beginning of Lines
From: |
Michael Heerdegen |
Subject: |
Re: Adding String to Beginning of Lines |
Date: |
Wed, 11 Nov 2020 12:16:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
<tomas@tuxteam.de> writes:
> But watch out: the replacement string (confusingly called `regex' here,
> others have already pointed that out) might contain special sequences
> (e.g. "\\&") which have a meaning in this context.
Indeed, an important objection.
I would suggest to avoid using any query-replace at all and rather use
something like
#+begin_src emacs-lisp
(save-excursion
(while (and (<= (point) end)
(not (eobp)))
(insert my-string)
(forward-line +1))
(deactivate-mark))
#+end_src
> Cheers
Ebenso!
Regards,
Michael.
- Re: Adding String to Beginning of Lines, (continued)
- Re: Adding String to Beginning of Lines, Jean Louis, 2020/11/10
- Re: Adding String to Beginning of Lines, Michael Heerdegen, 2020/11/10
- Re: Adding String to Beginning of Lines, Jean Louis, 2020/11/10
- Re: Adding String to Beginning of Lines, Michael Heerdegen, 2020/11/11
- Re: Adding String to Beginning of Lines, Jean Louis, 2020/11/17
- Re: Adding String to Beginning of Lines, Michael Heerdegen, 2020/11/17
- Re: Adding String to Beginning of Lines, Stefan Monnier, 2020/11/10
- RE: Adding String to Beginning of Lines, Drew Adams, 2020/11/10
- Re: Adding String to Beginning of Lines, Michael Heerdegen, 2020/11/11
- Re: Adding String to Beginning of Lines, tomas, 2020/11/10
- Re: Adding String to Beginning of Lines,
Michael Heerdegen <=
- Re: Adding String to Beginning of Lines, Christopher Dimech, 2020/11/11
- Re: Adding String to Beginning of Lines, Michael Heerdegen, 2020/11/11
- Re: Adding String to Beginning of Lines, tomas, 2020/11/11
- Re: Adding String to Beginning of Lines, Christopher Dimech, 2020/11/11
- Re: Adding String to Beginning of Lines, Christopher Dimech, 2020/11/11
- Re: Adding String to Beginning of Lines, Michael Heerdegen, 2020/11/11
- Re: Adding String to Beginning of Lines, Stefan Monnier, 2020/11/11
- Re: Adding String to Beginning of Lines, Christopher Dimech, 2020/11/11
- Re: Adding String to Beginning of Lines, Jean Louis, 2020/11/10
Re: Adding String to Beginning of Lines, Michael Heerdegen, 2020/11/10