GNU bug report logs - #54017
add regexp translation option to read-regexp

Previous Next

Package: emacs;

Reported by: emacsq <laszlomail <at> protonmail.com>

Date: Tue, 15 Feb 2022 20:22:01 UTC

Severity: wishlist

Full log


Message #26 received at 54017 <at> debbugs.gnu.org (full text, mbox):

From: emacsq <laszlomail <at> protonmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 54017 <at> debbugs.gnu.org
Subject: Re: bug#54017: add regexp translation option to read-regexp
Date: Thu, 17 Feb 2022 10:55:22 +0000
> 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)?

The purpose of regexp translation is that all user facing regexps by
read-regexp should use the translated format, so if there is a need
for a function which converts to the convenient format then the
user should provide that as well. Maybe there should be one function only
with  an argument specifying the direction of the translation.

BTW, ideally the variables you mentioned ('search-default-mode' and
'replace-regexp-function') should be merged with this option, because
it's unlikely the user wants one regexp syntax for one command and a
different syntax for an other one, so there should be a single
translation function which works everywhere where user facing
regexps occur.





This bug report was last modified 3 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.