From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ndame via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#52558: Option for easier typing of regexps Date: Thu, 16 Dec 2021 17:41:17 +0000 Message-ID: Reply-To: ndame Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33346"; mail-complaints-to="usenet@ciao.gmane.io" To: 52558@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 16 18:42:29 2021 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 1mxulx-0008XE-Dt for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Dec 2021 18:42:29 +0100 Original-Received: from localhost ([::1]:43466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxulw-00068n-Cg for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 16 Dec 2021 12:42:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxulW-00068W-U3 for bug-gnu-emacs@gnu.org; Thu, 16 Dec 2021 12:42:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxulW-0004XR-7z for bug-gnu-emacs@gnu.org; Thu, 16 Dec 2021 12:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxulW-0006Cn-6c for bug-gnu-emacs@gnu.org; Thu, 16 Dec 2021 12:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ndame Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Dec 2021 17:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52558 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "Bug reports for GNU Emacs, the Swiss army knife of text editors" Original-Received: via spool by submit@debbugs.gnu.org id=B.163967648623801 (code B ref -1); Thu, 16 Dec 2021 17:42:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Dec 2021 17:41:26 +0000 Original-Received: from localhost ([127.0.0.1]:36615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxukw-0006Bp-Fs for submit@debbugs.gnu.org; Thu, 16 Dec 2021 12:41:26 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxukv-0006Bi-0Z for submit@debbugs.gnu.org; Thu, 16 Dec 2021 12:41:25 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxuku-0005sU-BM for bug-gnu-emacs@gnu.org; Thu, 16 Dec 2021 12:41:24 -0500 Original-Received: from mail-40132.protonmail.ch ([185.70.40.132]:62569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxuks-0003G3-Dp for bug-gnu-emacs@gnu.org; Thu, 16 Dec 2021 12:41:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1639676479; bh=h+MxhCIfWxHJ8/7G9WvAefziuZ9rrAOZR/iiNIUXvtg=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=DNEFYu8CkonZ1rVn91DolyD2jtML2A5mcHbV5NLpRtQcFQKalsjQeb/T1IAnMcCXU Qs8Xu830wIWUGuyxy65/n4iSQ4QI9XjKrBx+P2LwGFvfff/VlU2Xg/71HSPgBiF4qy PEsqMmENPicBVi33Z29sXlRcfeCpEWpX/rylJr1FrZDFVW7YpMljEdUZ15KBWWvsdE 2f12Ai0TkyBQ4bSfdUhQmKzj+1Wbr44w6KuT7pYBuz+UU8zkxLtAk1/0tLLSYr4c+Q wePliAPQP73G0YTlm6jr4YASktCvCW9q6j6zBOU2re98hOkFE+beC/de++Fk1ZASyb WHLPmIJ7JM6/Q== Received-SPF: pass client-ip=185.70.40.132; envelope-from=laszlomail@protonmail.com; helo=mail-40132.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-ACL-Warn: , ndame Xref: news.gmane.io gmane.emacs.bugs:222513 Archived-At: I use query replace regexp a lot, as I imagine other people do, and I always found that typing capturing groups and alternation is clumsy, because they have to be escaped, and they are the ones needed most often: \(...\) \| There could be a user option to make these easier to type by providing a variable which controls which characters need escaping in interactive mode, so the user could list those characters for which the escaping rules are reversed when typing in the regexp replace prompt. E.g. specifying "()|" means the user can do capturing and alternation without typing backslashes and match the literal characters with escaping. This is only an interactive helper feature, so it does not affect the underlying lisp implementation. The input of the interactive prompt is normalized after submission.