From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Regular expression creation [was: Re: Emacs Lisp's future] Date: Thu, 18 Sep 2014 22:12:07 -0400 Message-ID: References: <87wq97i78i.fsf@earlgrey.lan> <20140917202418.240bbd2c@forcix> <87egv9y5m6.fsf@gmail.com> <541B0AFC.9080501@dancol.org> <87zjdwwpab.fsf@gmail.com> <87y4tgwjso.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411092770 10538 80.91.229.3 (19 Sep 2014 02:12:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2014 02:12:50 +0000 (UTC) Cc: Emacs development discussions To: Alexis Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 19 04:12:43 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 1XUngf-0006Jg-U2 for ged-emacs-devel@m.gmane.org; Fri, 19 Sep 2014 04:12:42 +0200 Original-Received: from localhost ([::1]:55473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUngf-0001SU-9X for ged-emacs-devel@m.gmane.org; Thu, 18 Sep 2014 22:12:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUngL-0001SG-Ix for emacs-devel@gnu.org; Thu, 18 Sep 2014 22:12:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUngE-0004AT-2v for emacs-devel@gnu.org; Thu, 18 Sep 2014 22:12:21 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUngD-0004A7-VC for emacs-devel@gnu.org; Thu, 18 Sep 2014 22:12:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArUGAIDvNVNFpZEG/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="90246284" Original-Received: from 69-165-145-6.dsl.teksavvy.com (HELO pastel.home) ([69.165.145.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2014 22:12:08 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 0ED2C6860B; Thu, 18 Sep 2014 22:12:08 -0400 (EDT) In-Reply-To: <87y4tgwjso.fsf@gmail.com> (Alexis's message of "Fri, 19 Sep 2014 10:00:36 +1000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:174531 Archived-At: > debates around raw strings, i still feel something like Stefan's > suggestion for a built-in `re-escape` function would probably solve most > of the issues i have with ELisp REs. And note that re-escape should be easy to write. I guess the main issue would be to decide what escape character to use (assuming "(" is used for regexp-grouping, what should be used to match a plain open-parenthesis? "\(" is not an option since it's the same string as "(", so you either have to go with "\\(" which (as we know) sucks, or choose another escape char than backslash). Stefan