From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: How to really escape a double quote? Date: Sat, 26 Feb 2011 10:00:22 +0100 Organization: Organization?!? Message-ID: <87d3mfi315.fsf@lola.goethe.zz> References: <87sjvdq8z2.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1298713266 32315 80.91.229.12 (26 Feb 2011 09:41:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 Feb 2011 09:41:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 26 10:40:58 2011 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.69) (envelope-from ) id 1PtGe0-0005Kx-5v for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Feb 2011 10:40:56 +0100 Original-Received: from localhost ([127.0.0.1]:51327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtGdz-0001iP-HS for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Feb 2011 04:40:55 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!kanaga.switch.ch!news-zh.switch.ch!switch.ch!newsfeed01.chello.at!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:1cxttVQUxGeJJJmo+1JpuHCzfFE= Original-Lines: 37 Original-NNTP-Posting-Date: 26 Feb 2011 10:00:22 CET Original-NNTP-Posting-Host: 686ed38a.newsspool1.arcor-online.net Original-X-Trace: DXC=o8EBM==BX3S<<0iRN7DLEQic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgR`IFg:9DCNkRQF2\gH8m9HY^9QSCVg3dOVPXAdj3Ee7^Xi:^>SaK\f4SHQ`:=C<8h\V Original-X-Complaints-To: usenet-abuse@arcor.de Original-Xref: usenet.stanford.edu gnu.emacs.help:185342 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:79499 Archived-At: Kevin Rodgers writes: > On 2/24/11 5:00 PM, David Kastrup wrote: > ... >> ^ loses its special meaning if it is not the first character of the >> string. So move your escaped double-quote one position to the right. > > I didn't know that! Here's the reference from (elisp)Regexp Special: > > For historical compatibility reasons, `^' can be used only at the > beginning of the regular expression, or after `\(', `\(?:' or > `\|'. You are looking in a non-obvious place for information which you then somehow map to the required one, making it appear like using Emacs is a black art. It would suffice to consult the DOC string of the function in question: skip-chars-forward is a built-in function in `C source code'. (skip-chars-forward STRING &optional LIM) Move point forward, stopping before a char not in STRING, or at pos LIM. STRING is like the inside of a `[...]' in a regular expression except that `]' is never special and `\' quotes `^', `-' or `\' (but not at the end of a range; quoting is never needed there). Thus, with arg "a-zA-Z", this skips letters stopping before first nonletter. With arg "^a-zA-Z", skips nonletters stopping before first letter. Char classes, e.g. `[:alpha:]', are supported. Returns the distance traveled, either zero or positive. [back] -- David Kastrup