From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#54017: add regexp translation option to read-regexp Date: Wed, 16 Feb 2022 20:25:43 +0200 Organization: LINKOV.NET Message-ID: <8635kj2h7s.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28405"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 54017@debbugs.gnu.org To: emacsq Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 16 19:48:49 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 1nKPM9-0007F8-1t for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Feb 2022 19:48:49 +0100 Original-Received: from localhost ([::1]:37328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKPM8-0005rI-0O for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Feb 2022 13:48:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKPIX-00044v-EZ for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 13:45:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nKPIW-0003vK-4n for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 13:45:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nKPIW-00064z-4H for bug-gnu-emacs@gnu.org; Wed, 16 Feb 2022 13:45:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Feb 2022 18:45:04 +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.164503708623261 (code B ref 54017); Wed, 16 Feb 2022 18:45:04 +0000 Original-Received: (at 54017) by debbugs.gnu.org; 16 Feb 2022 18:44:46 +0000 Original-Received: from localhost ([127.0.0.1]:49431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKPIE-000637-Jt for submit@debbugs.gnu.org; Wed, 16 Feb 2022 13:44:46 -0500 Original-Received: from relay11.mail.gandi.net ([217.70.178.231]:49709) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKPID-00062f-0f for 54017@debbugs.gnu.org; Wed, 16 Feb 2022 13:44:45 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 9DD0C100004; Wed, 16 Feb 2022 18:44:37 +0000 (UTC) In-Reply-To: (emacsq via's message of "Tue, 15 Feb 2022 20:21:35 +0000") 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:227047 Archived-At: > Suppose, the user wants to use ( ) for capturing and > \( \) for matching parens. He provides a function > which does this translation. > > If this new option is set and is a function which does > the translation then read-regexp will > > - accept the format which the user prefers, in this case > ( ... ) for capturing. > > - store regexps in this format in history, so the user > can work with the user's preferred format even when > retrieving history entries. > > - return the elisp format regexp by calling the function > provided by the user which does the translation. This user option already exists. It's name is 'search-default-mode'. For stand-alone query-replace it's called 'replace-regexp-function'. So we just need someone to write these regexp translation functions.