From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#52558: Option for easier typing of regexps Date: Mon, 20 Dec 2021 11:46:32 -0800 Message-ID: <0cac11c8-78c2-5625-d023-cda3bd4d7c9c@gmail.com> References: <87o85cvmek.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31834"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52558@debbugs.gnu.org To: Lars Ingebrigtsen , ndame Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 20 20:47:36 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 1mzOdE-00083v-GO for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 20:47:36 +0100 Original-Received: from localhost ([::1]:40874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzOdC-0006Np-TY for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Dec 2021 14:47:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzOcg-0006Lf-Bq for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 14:47:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzOcg-00010K-3H for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 14:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzOcf-0002Gv-Vy for bug-gnu-emacs@gnu.org; Mon, 20 Dec 2021 14:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Dec 2021 19:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52558 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 52558-submit@debbugs.gnu.org id=B52558.16400296048706 (code B ref 52558); Mon, 20 Dec 2021 19:47:01 +0000 Original-Received: (at 52558) by debbugs.gnu.org; 20 Dec 2021 19:46:44 +0000 Original-Received: from localhost ([127.0.0.1]:51508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzOcN-0002GK-PY for submit@debbugs.gnu.org; Mon, 20 Dec 2021 14:46:43 -0500 Original-Received: from mail-pj1-f44.google.com ([209.85.216.44]:34788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzOcJ-0002G6-Rx for 52558@debbugs.gnu.org; Mon, 20 Dec 2021 14:46:43 -0500 Original-Received: by mail-pj1-f44.google.com with SMTP id v13-20020a17090a088d00b001b0e3a74cf7so460060pjc.1 for <52558@debbugs.gnu.org>; Mon, 20 Dec 2021 11:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=X+pdhGtAkteAebLfgndVPpUxZ06/rFZz1CmNigWLmrQ=; b=ZS4aRdmqPjLoJSCFzuGD99jIHwJnED/SYB22VzuQgcw+s6GbeMkDOzFYWQ72dWT7Pe JuyLAYvM7BiCKMiiFx5ZiaNIyStO9QIa+lG0KWju7Z2cq6emVw2wQAYBqKr8thT0/jcQ CAadbbQrAtfPort/trECKxTNPPSk0PWF9qHK3Cx/gND4CLgH9mw4cLTiXCWshfQzS9Gi fPDjgKGw/xM0u7CcIZRubcthKVpi3ZAoq9wI70Xkcuq6C+3i0OLxjL+8VHZ0x+soVzEY tBv/DE2r9T6H4vzDqgpvbO3UE51BXjBZJVMWI1sBJ2WmCHVe/QXPIapNM2uckLn3Ffld WNyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=X+pdhGtAkteAebLfgndVPpUxZ06/rFZz1CmNigWLmrQ=; b=OCe3CR3h63lE4TCLE68orJ2+6wQxgDO9c01Hn4ruoNZ1QT6CEUTGf2W4/MzME4I5ei YTNvOGJZqYm0uiO57PIRH/ihWtuKChTmbU2LP5CvT3tMXKsFen1nhK1wQxf6mESVnwwO D8+iMLx0SKDbyuTtKd2AAfeyW4mZqy4z4YJs0O6RZMwkAYX3rUNm5DDuyxSMCSxd9sC5 uKS7OBru6d2MaIHYe4/Fhq7w8jUe0u/9fmvLJTCqYSRFs2FIE8qp5MtVFd/lr2A7Er0e vvNMgmNjP92zdj4sktN4BvJX6mnmAPU8031wTkfERs/Z5YiUR+DiAhXChucM3pJ/HISz We/g== X-Gm-Message-State: AOAM533SrwxCRyp/+BIisldsbbiqt1suBmDOkfj/MSrmhM/9FSnPWYZc RyOHYQ8dsnUXAXmUUylhw6nxJ5LP/fk= X-Google-Smtp-Source: ABdhPJzq6VUWszF52pqr6r3nxRoO61YPudY0JHmuzkbJHBx9IoX9hO9hfrulUwDBmjhUm5eo0mvPuQ== X-Received: by 2002:a17:90a:4b03:: with SMTP id g3mr598168pjh.167.1640029594002; Mon, 20 Dec 2021 11:46:34 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id s19sm19963720pfu.137.2021.12.20.11.46.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Dec 2021 11:46:33 -0800 (PST) In-Reply-To: <87o85cvmek.fsf@gnus.org> Content-Language: en-US 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:222808 Archived-At: On 12/19/2021 3:56 AM, Lars Ingebrigtsen wrote: > I think it would be really confusing to have a different regexp syntax > when prompting interactively to when you're writing code, so I don't > think this would be a good idea. Anybody else have a different opinion? I think this depends on how people use Emacs. While there's definitely some potential for confusion if you switch between entering Emacs regexps interactively or by writing Elisp, there's also potential for confusion if you often write regexps for external tools from Emacs. For example, if you use one of the "modern" recursive grep-like tools (ack, ag, ripgrep, etc), most of them use PCRE syntax (or something close to PCRE). It's easy to forget that Isearch uses BRE but your preferred rgrep-like tool uses ERE/PCRE. I've attempted to resolve this issue in the other direction in Urgrep[1], which provides a unified way of running all these recursive grep-like tools. Specifically, it defaults to accepting BRE syntax and then, if the tool only accepts ERE/PCRE, it converts the BRE input into ERE/PCRE. That's not perfect either since then you end up in a situation where to use PCRE features, you have to enter them in a BRE-like syntax, which I find pretty confusing too. (This behavior is customizable in Urgrep, so if you like ERE/PCRE, you can set those as the input syntax.) I'm not sure this makes the decision about what to do any easier though. In fact, it probably just muddies the waters further. :) [1] https://github.com/jimporter/urgrep