From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexis Newsgroups: gmane.emacs.devel Subject: Regular expression creation [was: Re: Emacs Lisp's future] Date: Fri, 19 Sep 2014 07:54:19 +1000 Message-ID: <87zjdwwpab.fsf@gmail.com> References: <87wq97i78i.fsf@earlgrey.lan> <20140917202418.240bbd2c@forcix> <87egv9y5m6.fsf@gmail.com> <541B0AFC.9080501@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411078451 6794 80.91.229.3 (18 Sep 2014 22:14:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2014 22:14:11 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 19 00:14:04 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XUjxj-0003ii-64 for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2014 00:14:03 +0200 Original-Received: from localhost ([::1]:54127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUjxi-00019w-Jl for ged-emacs-devel@m.gmane.org; Thu, 18 Sep 2014 18:14:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUjxM-00019h-7a for emacs-devel@gnu.org; Thu, 18 Sep 2014 18:13:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUjxC-0006x4-Sz for emacs-devel@gnu.org; Thu, 18 Sep 2014 18:13:40 -0400 Original-Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:43117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUjxC-0006wc-Lt for emacs-devel@gnu.org; Thu, 18 Sep 2014 18:13:30 -0400 Original-Received: by mail-pa0-f48.google.com with SMTP id fb1so1528170pad.21 for ; Thu, 18 Sep 2014 15:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:subject:date:in-reply-to:message-id:mime-version :content-type; bh=/bX2h60rKZvxOfx2R5SOmcZK19H6+LUGNgwWrX/NOX0=; b=vKGvEA8oL3pKL1vOH2eg/LDj1DggBa9lfP8pQ3AYeyKe/FiauHC5yG9dJ6bGMJRJnE ejRivU26vaw4FYzsRkIdcgH3WxG3eG5rbYxJhvzO9sSvILr0w4b97KXC9j7oDjqRY0Lf x/UyFhuwpL8ss31ih3XFjuhtLw5/ql8Zh9xOeT3RsL0GHrMfPdiYMWUe1AxlqEdcVX4q yN83SaaBuJ5nRBo63pfdN6+mTpdmS07Z4wWYyhnA/ZSlu6hGwp+IkaqQctopgXgV7+Iq nvc0WqFrE1/uo2h1AyEZk7yEmvu22URivjTygjfi2qo5/vs0lTTTLSlSGlURnUvGkRqj l5jQ== X-Received: by 10.66.97.41 with SMTP id dx9mr9665133pab.65.1411078403885; Thu, 18 Sep 2014 15:13:23 -0700 (PDT) Original-Received: from localhost (ppp118-209-61-149.lns20.mel4.internode.on.net. [118.209.61.149]) by mx.google.com with ESMTPSA id ki1sm28653pdb.59.2014.09.18.15.13.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 18 Sep 2014 15:13:22 -0700 (PDT) In-reply-to: <541B0AFC.9080501@dancol.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174519 Archived-At: Daniel Colascione writes: > On 09/17/2014 07:07 PM, Alexis wrote: >> i like this suggestion. i'm rather comfortable with Perl5 REs, and can >> find myself frustrated trying to create REs in ELisp. Having said that, >> the issue is not usually the syntax of ELisp REs per se (e.g. needing to >> escape things like capturing parentheses or the alternatives pipe); it's >> needing to escape various things /further/ because REs can only be >> specified in the form of a standard ELisp string. On several occasions >> i've ended up using a combination of pcre-to-elisp and re-builder to try >> to work out if the problem is too few backslashes, too many backslashes, >> or both. > > That's why we have rx. i find rx .... unwieldy. For me, rx is to PCREs as a putative function 'apply-function-to-each-element-of-sequence' is to 'mapcar'. i don't want an English-language wrapper for regular expressions; i want regular expressions that don't suffer from backslashitis. And, given the several discussions by a number of people over the last several months - including recently - about alternatives to the current RE-creation system in Emacs, it seems to me that rx is hardly the final piece of the Emacs Lisp RE puzzle. Alexis.