[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improve `replace-regexp-in-string' ergonomics?
From: |
Thierry Volpiatto |
Subject: |
Re: Improve `replace-regexp-in-string' ergonomics? |
Date: |
Tue, 12 Oct 2021 13:33:21 +0000 |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> BTW, the current limit on backrefs is just due to a lack of syntax for
>> higher-numbered backrefs, so it would be easy to lift this limit: it's
>> a small matter of choosing an appropriate syntax and then adjusting the
>> code that parses the regexps in regexp.c.
>
> A small matter indeed. :-/
>
> But perhaps it would be worth doing -- arbitrary limitations like that
> goes against everything GNU stands for!
What about providing a simple anaphoric `and`?
(let ((bar "bar"))
(helm-aand bar
(replace-regexp-in-string "b" "f" it)
(replace-regexp-in-string "a" "o" it)
(replace-regexp-in-string "r" "o" it)))
=>"foo"
And in addition it can be used for something else.
--
Thierry
- Re: Improve `replace-regexp-in-string' ergonomics?, Juri Linkov, 2021/10/05
- Re: Improve `replace-regexp-in-string' ergonomics?, Juri Linkov, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?, Lars Ingebrigtsen, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?, Stefan Monnier, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?, Lars Ingebrigtsen, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?, Lars Ingebrigtsen, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?, Mattias EngdegÄrd, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?, Stefan Monnier, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?,
Thierry Volpiatto <=
- Re: Improve `replace-regexp-in-string' ergonomics?, Juri Linkov, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?, Thierry Volpiatto, 2021/10/12
- Re: Improve `replace-regexp-in-string' ergonomics?, Juri Linkov, 2021/10/13
- Re: Improve `replace-regexp-in-string' ergonomics?, Thierry Volpiatto, 2021/10/13