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: Raw strings (experimental patches inside) Date: Sat, 04 Aug 2012 19:47:14 -0400 Message-ID: References: <651F6603-F798-4381-929E-7D86A28DBC4D@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344124044 10660 80.91.229.3 (4 Aug 2012 23:47:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Aug 2012 23:47:24 +0000 (UTC) Cc: =?iso-8859-1?Q?Aur=E9lien?= Aptel , Emacs development discussions To: Ivan Andrus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 05 01:47:24 2012 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 1Sxo42-00011h-RD for ged-emacs-devel@m.gmane.org; Sun, 05 Aug 2012 01:47:22 +0200 Original-Received: from localhost ([::1]:48607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxo42-0006Yw-5q for ged-emacs-devel@m.gmane.org; Sat, 04 Aug 2012 19:47:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxo3z-0006Yf-OT for emacs-devel@gnu.org; Sat, 04 Aug 2012 19:47:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sxo3y-0002nv-Ra for emacs-devel@gnu.org; Sat, 04 Aug 2012 19:47:19 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:51116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sxo3y-0002nr-Ni for emacs-devel@gnu.org; Sat, 04 Aug 2012 19:47:18 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q74NlFH6029911; Sat, 4 Aug 2012 19:47:15 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id CB255AE2FA; Sat, 4 Aug 2012 19:47:14 -0400 (EDT) In-Reply-To: <651F6603-F798-4381-929E-7D86A28DBC4D@gmail.com> (Ivan Andrus's message of "Sat, 4 Aug 2012 16:38:02 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4300=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4300> : streams <794574> : uri <1183949> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:152179 Archived-At: >>> When I type a regex I'm always annoyed by the amount of escaping >>> I have to do. I've always wished Emacs Lisp had raw strings >>> ie. a syntax to type litteral text without interpretation. >> AFAIK, the only real use-case is indeed regexp, and for them a better >> solution would be to not escape the parentheses at all. > That doesn't handle the horror that is searching for backslashes... That is not a problem significant enough to warrant the introduction of something like raw-strings. > It would also be nice to have a function which takes a string representation > and converts it to an `rx' representation, which I couldn't find in rx when > I looked. Indeed, we don't have that right now. My lex.el includes something pretty close, but I'd rather not include lex.el into Emacs because it's not clean enough. OTOH maybe I could add it to GNU ELPA. Stefan