From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: HippoMan Newsgroups: gmane.emacs.help Subject: Re: Converting a non-escaped regexp to an escaped version Date: Thu, 07 Jun 2007 15:12:02 -0000 Organization: http://groups.google.com Message-ID: <1181229122.650727.281510@p47g2000hsd.googlegroups.com> References: <1181219573.415318.285860@n4g2000hsb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1181230841 5493 80.91.229.12 (7 Jun 2007 15:40:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Jun 2007 15:40:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 07 17:40:40 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HwK6J-0006eW-Un for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Jun 2007 17:40:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwK6J-0005Rk-DE for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Jun 2007 11:40:39 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!p47g2000hsd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: 167.203.158.141 Original-X-Trace: posting.google.com 1181229122 9236 127.0.0.1 (7 Jun 2007 15:12:02 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 7 Jun 2007 15:12:02 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 nykchlnc03 (NetCache NetApp/6.0.3D2), Version 2.2-Build_Linux_1063 $Date: 11/16/2005 13:40:0013$(IWSS), 1.1 nykchlnc03 (NetCache NetApp/6.0.3D2), 1.1 nykprtnc02 (NetCache NetApp/6.0.3D2) Complaints-To: groups-abuse@google.com Injection-Info: p47g2000hsd.googlegroups.com; posting-host=167.203.158.141; posting-account=LFgiJw0AAAA9JjgEI-Yqa3QO3e_RXOXE Original-Xref: shelby.stanford.edu gnu.emacs.help:149171 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44757 Archived-At: On Jun 7, 10:35 am, Joost Kremers wrote: > Nikolaj Schumacher wrote: > > On 2007-06-07, at 14:32, HippoMan wrote: > > >> During development of elisp code that I'm writing, I test regular > >> expressions via the interactive use of M-x re-search-forward. Once > >> I've come up with a regexp that works, I often will want > >> to yank it into my elisp code, for example, into a call to > >> `match-string'. > > > Not really a solution for your specific problem, but I'd suggest > > using `re-builder' for that. > > it can be a solution, though: re-builder supports different forms of input > syntax. by default, it requires you to escape backslashes, so that when you > type C-c C-w to copy the regexp to the kill-ring, you get it with every > backslash escaped. > > if you don't want to type the double backslashes, you can change > re-builders input syntax (with C-c TAB)from "read" to "string". then, > before typing C-c C-w change it back again to "read": re-builder will > automatically adjust the syntax and escape all backslashes for you. > > it's a pretty neat package, that re-builder. Thank to all of you who suggested re-builder. I can live with the changing of its input syntax from "read" to "string". Hey, I might write my own function(s) for automating even this!