From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Off Topic Date: Thu, 24 May 2018 16:36:59 -0400 Message-ID: References: <7D0B397D-5D1B-4B8C-93B6-1CA207DD552A@scratch.space> <6271469D-6B02-4334-828E-D81816143734@scratch.space> <20180524163534.GA4035@ACM> <20180524195755.GB4035@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1527194163 29491 195.159.176.226 (24 May 2018 20:36:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 May 2018 20:36:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 24 22:35:59 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLwxr-0007YC-8d for ged-emacs-devel@m.gmane.org; Thu, 24 May 2018 22:35:59 +0200 Original-Received: from localhost ([::1]:40590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLwzw-0004c6-Jo for ged-emacs-devel@m.gmane.org; Thu, 24 May 2018 16:38:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLwz8-0004bm-GS for emacs-devel@gnu.org; Thu, 24 May 2018 16:37:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLwz3-0001W1-HM for emacs-devel@gnu.org; Thu, 24 May 2018 16:37:18 -0400 Original-Received: from [195.159.176.226] (port=49502 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLwz3-0001Vg-AH for emacs-devel@gnu.org; Thu, 24 May 2018 16:37:13 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fLwwp-0006O9-B0 for emacs-devel@gnu.org; Thu, 24 May 2018 22:34:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:NJ2D8n08kx3+IIK+1WlCwHRUNCw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:225678 Archived-At: > Yes. But... rx.el needs to be _learnt_. You cannot, at least not yet, > learn rx.el as an alternative to normal string regexp syntax, because > the string syntax is so common that it _must_ be learnt. So rx.el is an > optional extra. It seems unlikely that its use could spread beyond > Emacs, so the effort learning rx.el is going to yield special purpose > knowledge only. Very good point. For me the problem is just that rx.el regexps are too verbose. >> I like rx.el because its expressions can be navigated structurally, using >> ‘backward-up-list’, ‘forward-sexp’, and the like. The same commands work on >> regular regular expressions only if they have not been broken up for >> readability. > What would be useful would be a function to turn normal regexps into > rx.el syntax. http://elpa.gnu.org/packages/lex.html provides the function `lex-parse-re` for that. Stefan