[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54017: add regexp translation option to read-regexp
From: |
Eli Zaretskii |
Subject: |
bug#54017: add regexp translation option to read-regexp |
Date: |
Thu, 17 Feb 2022 11:18:10 +0200 |
> From: Juri Linkov <juri@linkov.net>
> Date: Thu, 17 Feb 2022 10:24:14 +0200
> Cc: 54017@debbugs.gnu.org
>
> It's easy to add regexp translation to the return value of read-regexp.
> But there is one complication: the default value returned by
> read-regexp-defaults-function might be a function like
> find-tag-default-as-regexp that returns a regexp in the
> default format created by regexp-quote.
>
> Do you agree that a pair of two translation functions should be provided:
> one to translate a custom regexp syntax to the default regexp syntax
> (to be used on the return value of read-regexp), and another translation
> from the default regexp syntax to the custom regexp syntax (to be used
> to translate the default regexp value added to the minibuffer)?
Before we install something like this, we need to discuss the relevant
use cases and agree that it makes sense for us to support them.
I originally interpreted the OP's request as asking for a feature
where the user could use one of the regexp styles used by other
programs, such as BRE or ERE or maybe PCRE. If this is indeed the
intent, then I'd rather we implemented support for only those specific
styles (or some subset of them). It doesn't make sense to me to
support arbitrary translations of regular expressions, because I see
no valid use cases for such a general feature, and am unaware of any
other applications which support regular expressions that allow such
arbitrary translations.
- bug#54017: add regexp translation option to read-regexp, emacsq, 2022/02/15
- bug#54017: add regexp translation option to read-regexp, Juri Linkov, 2022/02/16
- bug#54017: add regexp translation option to read-regexp, emacsq, 2022/02/16
- bug#54017: add regexp translation option to read-regexp, Juri Linkov, 2022/02/17
- bug#54017: add regexp translation option to read-regexp, Juri Linkov, 2022/02/17
- bug#54017: add regexp translation option to read-regexp,
Eli Zaretskii <=
- bug#54017: add regexp translation option to read-regexp, emacsq, 2022/02/17
- bug#54017: add regexp translation option to read-regexp, Juri Linkov, 2022/02/17
- bug#54017: add regexp translation option to read-regexp, emacsq, 2022/02/20
- bug#54017: add regexp translation option to read-regexp, Eli Zaretskii, 2022/02/20
- bug#54017: [External] : bug#54017: add regexp translation option to read-regexp, Drew Adams, 2022/02/20
- bug#54017: add regexp translation option to read-regexp, emacsq, 2022/02/17