help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: replace-regexp


From: Emanuel Berg
Subject: Re: replace-regexp
Date: Sun, 09 May 2021 01:16:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier via Users list for the GNU Emacs text editor wrote:

>>> My comment wasn't just for regexp-replacement but more
>>> generally for operating on a region. So better or not will
>>> depend on the specific case. In many cases either way is
>>> about as good.
>>
>> In general I don't like to use `setq' and in this case it
>> also
>
> You can use (let ((end (copy-marker end t))) ...), of
> course. I don't find it cryptic at all, but I'm probably not
> well placed to judge.

Let's say to a person who knows programming and Lisp to some
extent but isn't an expert on Emacs internals.

> In any case, my main point was that using narrowing can have
> undesirable side effects because narrowing has
> a far-reaching impact on operations in the buffer, so
> depending on what you need to do within your loop you might
> prefer to stay away from it (unless this far-reaching impact
> is exactly what you're looking for, obviously).

Yeah, that I'll not use.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]