[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improve `replace-regexp-in-string' ergonomics?
From: |
Lars Ingebrigtsen |
Subject: |
Re: Improve `replace-regexp-in-string' ergonomics? |
Date: |
Wed, 22 Sep 2021 08:36:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Yuri Khan <yuri.v.khan@gmail.com> writes:
> However, I have a hypothesis that what users really want is “I have
> this list of pattern/replacement pairs, and I want to go through each
> occurrence of each pattern in the original text, and replace them with
> their respective replacements”, without thinking about intermediate
> buffer contents.
That's a good point. That points towards a new `regexp-replace'
function that takes all the replacement pairs and does the right thing
here instead of chaining independent calls.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Re: Improve `replace-regexp-in-string' ergonomics?, Adam Porter, 2021/09/22
Re: Improve `replace-regexp-in-string' ergonomics?, Andreas Schwab, 2021/09/22
Re: Improve `replace-regexp-in-string' ergonomics?, Augusto Stoffel, 2021/09/22