From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: modern regexes in emacs Date: Sat, 16 Feb 2019 22:17:37 -0500 Message-ID: References: <20180616123704.7123f6d7@jabberwock.cb.piermont.com> <87po0qs6re.fsf@gmail.com> <83r2c9m8yj.fsf@gnu.org> <17581DA9-7DCA-432E-A2E8-E5184DFA8B4B@acm.org> <20190215114728.0785e891@jabberwock.cb.piermont.com> <20190215175405.GA5438@ACM> <83lg2gnbky.fsf@gnu.org> <3D5EA6AB-F0DA-4B66-8592-A111C906B3AE@acm.org> <83k1i0n88i.fsf@gnu.org> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="230523"; mail-complaints-to="usenet@blaine.gmane.org" Cc: mattiase@acm.org, lokedhs@gmail.com, perry@piermont.com, philippe.vaucher@gmail.com, jaygkamat@gmail.com, acm@muc.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 17 04:17:48 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvCxg-000xpH-IL for ged-emacs-devel@m.gmane.org; Sun, 17 Feb 2019 04:17:48 +0100 Original-Received: from localhost ([127.0.0.1]:35775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvCxf-0002vs-Dl for ged-emacs-devel@m.gmane.org; Sat, 16 Feb 2019 22:17:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvCxY-0002vW-PN for emacs-devel@gnu.org; Sat, 16 Feb 2019 22:17:41 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvCxW-0007jK-6X; Sat, 16 Feb 2019 22:17:38 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gvCxV-00083R-CA; Sat, 16 Feb 2019 22:17:38 -0500 In-Reply-To: <83k1i0n88i.fsf@gnu.org> (message from Eli Zaretskii on Fri, 15 Feb 2019 21:48:29 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233422 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > If I read the petitioners correctly, they want a global setting that > > permits them to type a(b|c) instead of a\(b\|c\) in > > isearch-forward-regexp and all other interactive commands. > That is not going to happen any time soon, because it will break gobs > of Emacs code. I don't see anyone proposing that, because they all > understand the impossible implications. That's true, of course. But I wonder if some other interface could make it possible to offer optional use of egrep syntax in a compatible way that would not break anything. A text property on the string could specify this. We could make a convenient function to add that text property -- that's how users would specify "new syntax". > If I read the petitioners correctly, they want a global setting > that permits them to type a(b|c) instead of a\(b\|c\) in > isearch-forward-regexp and all other interactive commands. The incremental search commands are a separate issue -- having a flag to control what syntax they use wouldn't break Lisp code. If we create a new letter in interactive specs to read a regexp, we could have a global variable specify that those should be treated as "new syntax". Arg reading would convert them to old syntax, or add the text property; after that, they could be simply passed along. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)