[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding String to Beginning of Lines
From: |
Christopher Dimech |
Subject: |
Re: Adding String to Beginning of Lines |
Date: |
Wed, 11 Nov 2020 14:22:44 +0100 |
> Sent: Wednesday, November 11, 2020 at 12:16 PM
> From: "Michael Heerdegen" <michael_heerdegen@web.de>
> To: help-gnu-emacs@gnu.org
> Subject: Re: Adding String to Beginning of Lines
>
> <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
That's what I started doing at the beginning. Should we revert to this
or continue with replace-regexp. Have now removed the confusingly called
`regex' and it is currently called nwltok.
> > Cheers
>
> Ebenso!
>
>
> Regards,
>
> Michael.
>
>
>
- Re: Adding String to Beginning of Lines, (continued)
- 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, 2020/11/11
- Re: Adding String to Beginning of Lines,
Christopher Dimech <=
- 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