From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jay Kamat Newsgroups: gmane.emacs.devel Subject: Re: modern regexes in emacs Date: Fri, 15 Feb 2019 18:44:27 -0800 Message-ID: <87r2c8jvuc.fsf@eve> 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> <43edeabe-7758-4c7e-b00c-fd16e3505ef7@default> <20190215183317.45d559a6@jabberwock.cb.piermont.com> <20190215204652.6ebc1615@jabberwock.cb.piermont.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="9066"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.0; emacs 26.1 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , lokedhs@gmail.com, emacs-devel@gnu.org, Philippe Vaucher , Jay Kamat , Alan Mackenzie , Eli Zaretskii , Drew Adams To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 16 03:45:11 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 1gupyY-00029b-Q2 for ged-emacs-devel@m.gmane.org; Sat, 16 Feb 2019 03:45:10 +0100 Original-Received: from localhost ([127.0.0.1]:50287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gupyX-0000zS-Mj for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 21:45:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gupxx-0000zC-7O for emacs-devel@gnu.org; Fri, 15 Feb 2019 21:44:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gupxw-0002Iu-FP for emacs-devel@gnu.org; Fri, 15 Feb 2019 21:44:33 -0500 Original-Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:44113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gupxv-0002IY-At; Fri, 15 Feb 2019 21:44:31 -0500 Original-Received: by mail-pf1-x429.google.com with SMTP id u6so5726946pfh.11; Fri, 15 Feb 2019 18:44:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=CIj5oNWg5Ruy5eu1dSsrkx3QaoiBgY8ilJl10fEi4QQ=; b=c/Exsww3WsBRYJZ+40I0rW1rIdUALeYXwsvDH70ZbelibChXBJUWNr+8GPVcLgx+HV 8f66oCQp7tff1idgGI5tR4GbegGOpvGtFQXG4sJHv1SVVcWhfVJKJBghxmBjd6HCnLaF WXSsR3Umqri2YNouEojDt5nmY8lb0Ym63onOs7qoCY0ayFVJ+XBQ2Sv0ueEXrZFdYT2L P/JT5FzC0HEQHFkFwY47AmtCiz5udQmNzz9L87T5cdSySZho7svjkVzv5w5TKfe8yMx1 FuN2mUqHO90P7gIf2FK9zwd1Zyn5SfqGX1l30dtckM76Gpainz/xYiEg7QahCo1m+7k8 pi8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=CIj5oNWg5Ruy5eu1dSsrkx3QaoiBgY8ilJl10fEi4QQ=; b=bVjKAv5I5JFyZCGNyhZdXHHfJuKFuZkmICWICldLRY8U3USRUTIRoCJy+rNzXBDHKu 3hEpWCYqVO5CrRchSZI9x6rgZNcy35jKYLayk8EJz7VD3bd2I35WyQ/C3VCAqwjz84GS ngilhzN6ViyQdMW9u2jXWNnsO0algHwRa1j+dXEUXeHpzg9RYGURViW7wnjvX0DqZ4Jd aQv37CuFhs7L41TZJze+pTO2IAUvedo00NVUsDA7i5ODecr81b9SFzjpd3EmBABLqxKs ALIhHzm0YZN5d4uQNugCAkrmQKPm0EprhKqsi0LW6bezKK4s20Gq6ho5fpAm1mI7TxBC btug== X-Gm-Message-State: AHQUAuYM3t5FH6sduYSWN4gYRzh4mAuua/Xbg92uU+0KU2fkVVmWGJtC a2uK8KNkqzYBe1Rb5yIPbE0FnZku0z4= X-Google-Smtp-Source: AHgI3Ia9e0nLZoul/33OF4purop71bZU+cICNqI52wWjK8l2FIieDk6hzmuPfFizKs6/tRXZji6BXw== X-Received: by 2002:a65:6210:: with SMTP id d16mr8161115pgv.34.1550285069908; Fri, 15 Feb 2019 18:44:29 -0800 (PST) Original-Received: from eve ([199.116.118.177]) by smtp.gmail.com with ESMTPSA id g69sm1667358pfd.168.2019.02.15.18.44.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 18:44:28 -0800 (PST) In-reply-to: <20190215204652.6ebc1615@jabberwock.cb.piermont.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::429 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:233409 Archived-At: Perry E. Metzger writes: > Other people get to pick what they want, too. > If you don't want to let other people get the option of using > the modern syntax, that's not demanding the right to use the old one, > which won't be taken from you, that's demanding the right to keep > other people from using the reasonable modern syntax. I think that's > unreasonable. I suppose you didn't read my previous mail past the first sentence, so I'll quote it below for convenience: >> I started using Emacs less than 4 years ago (so I could probably consider myself a 'modern user'), and I honestly find the new syntax much more confusing. I have never used the flags in those programs to get the new syntax, and I have seen those flags in a shrinking minority of shell scripts. I find the new syntax much more unreadable and arcane than the original, although the original is difficult by itself. >> >> I don't oppose adding more syntaxes, but I will never willingly use the new format personally. Although, now that you've proposed it, a world where everyone must use rx does sound very nice :). I haven't read too much in the regexp code of Emacs, but it might be easier to maintain one 'core' regexp language and translate 'alternative syntaxes' down to some form of common representation. It would also be nice to provide some facility for writing your own regexp flavor (Extended, Basic, Perl, Fixed, ) and integrating it into Emacs. Because of that, I think it would be a good idea to make whatever interface used support multiple possible flavors. I don't think that can easily be done with multiple standalone functions (by itself). It would also be nice to have some facility to pre 'compile' down to the intermediate representation ahead of time for performance reasons (if it's not all implemented via macros like rx is). -Jay