From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#54017: add regexp translation option to read-regexp Date: Thu, 17 Feb 2022 11:18:10 +0200 Message-ID: <83ee4126nh.fsf@gnu.org> References: <8635kj2h7s.fsf@mail.linkov.net> <86pmnlew9d.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30199"; mail-complaints-to="usenet@ciao.gmane.io" Cc: laszlomail@protonmail.com, 54017@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 17 10:39:19 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKdFv-0007jz-IM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Feb 2022 10:39:19 +0100 Original-Received: from localhost ([::1]:58764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKdFu-0003X9-1H for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Feb 2022 04:39:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKcwI-0000DO-BG for bug-gnu-emacs@gnu.org; Thu, 17 Feb 2022 04:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nKcwI-00013D-1C for bug-gnu-emacs@gnu.org; Thu, 17 Feb 2022 04:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nKcwH-0001Q4-Pe for bug-gnu-emacs@gnu.org; Thu, 17 Feb 2022 04:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Feb 2022 09:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54017 X-GNU-PR-Package: emacs Original-Received: via spool by 54017-submit@debbugs.gnu.org id=B54017.16450895325442 (code B ref 54017); Thu, 17 Feb 2022 09:19:01 +0000 Original-Received: (at 54017) by debbugs.gnu.org; 17 Feb 2022 09:18:52 +0000 Original-Received: from localhost ([127.0.0.1]:50128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKcvv-0001PV-Pt for submit@debbugs.gnu.org; Thu, 17 Feb 2022 04:18:52 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKcvt-0001PH-Su for 54017@debbugs.gnu.org; Thu, 17 Feb 2022 04:18:38 -0500 Original-Received: from [2001:470:142:3::e] (port=45386 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKcvo-0000zo-6X; Thu, 17 Feb 2022 04:18:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=AFknawXOeXkit+RiTLDVnSu0nx9P7ZgQSOrQgd/iLUI=; b=OJ5EjQZilB4T f+lmboPyUi7MbfT5ey7rjXIO3hM0l8eg/GuKpCTA8Pa4O0zpxHq6yeZwY7tmrp+u2+jlc67Eb94LH sYAJAX/FcYFudweYAzuhwJklfO1YuK6KzZQt+lnOfg3vBQgsI7rTTCS10LZBEGSwOvTX4n1mdNpBd b8fm3uie9xPJhXOZrDU/L3St3KYWP3e4Pujft1RyOioP/CGDsd+e9epniGJ4KXnJTF955c8iAK5Rz BE3M5jf6TwAUl7OBuZMqoMnSy3I7ekjYYpFWkkaIyNosxQCHvLgxjEBhEjMqDy32KCVUd1DK9IpyN R00eXHcLQUrdDFC3th+xxQ==; Original-Received: from [87.69.77.57] (port=1479 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKcvM-000510-6l; Thu, 17 Feb 2022 04:18:26 -0500 In-Reply-To: <86pmnlew9d.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 17 Feb 2022 10:24:14 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227075 Archived-At: > From: Juri Linkov > 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.