From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Raw strings (experimental patches inside) Date: Sat, 11 Aug 2012 16:39:49 +0900 Message-ID: <87a9y1swqi.fsf@uwakimon.sk.tsukuba.ac.jp> References: <651F6603-F798-4381-929E-7D86A28DBC4D@gmail.com> <502464D6.4000103@gmail.com> <87wr1749m0.fsf@uwakimon.sk.tsukuba.ac.jp> <502578E9.1020407@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: dough.gmane.org 1344670830 27609 80.91.229.3 (11 Aug 2012 07:40:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2012 07:40:30 +0000 (UTC) Cc: Emacs development discussions To: Vr Rm Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 11 09:40:31 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 1T06Ih-00008N-9d for ged-emacs-devel@m.gmane.org; Sat, 11 Aug 2012 09:39:59 +0200 Original-Received: from localhost ([::1]:43121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T06Ig-0002di-Eq for ged-emacs-devel@m.gmane.org; Sat, 11 Aug 2012 03:39:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T06Id-0002da-2v for emacs-devel@gnu.org; Sat, 11 Aug 2012 03:39:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T06Ib-0006YL-1P for emacs-devel@gnu.org; Sat, 11 Aug 2012 03:39:55 -0400 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:43248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T06Ia-0006Y8-NK for emacs-devel@gnu.org; Sat, 11 Aug 2012 03:39:52 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id B5E81970714; Sat, 11 Aug 2012 16:39:49 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 7A18411F88A; Sat, 11 Aug 2012 16:39:49 +0900 (JST) In-Reply-To: <502578E9.1020407@gmail.com> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta31) "ginger" b4715fcbe001 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.224 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:152430 Archived-At: Vr Rm writes: > /.*\)$/ > > i.e. a parenthesis at the end of a line. I can't do it! What you have is a syntax error interactively. It should work in a program (the backslash is a no-op in a string). /)$/ is good enough and works in both interactive regexp search and in a program (unless you need to match the whole line, in which case /^.*)$/ is what you want (AFAIK Emacs doesn't guarantee longest match even today; I think you can omit the "^" here, but I'd need to read the source to be sure). > [I'm a member of a] population that would dramatically benefit if > they could actually use Emacs regular expressions. Sure, but your blockage is that you aren't using Emacs REs, you're trying to use some other kind of RE. I think you might be helped a tiny bit by rawstrings, but I have to admit that Stefan is right in your case: the problem is not the proliferation of backslashes, it's that Emacs has a unique and comparatively awkward syntax for regular expressions. Rawstrings might make it a little bit easier for you to adapt, though.