From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seth Burleigh Subject: Re: [babel][bug] \ in detangling Date: Thu, 13 Jan 2011 11:16:48 -0600 Message-ID: References: <8762tsd9gg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1106486245==" Return-path: Received: from [140.186.70.92] (port=47045 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdQn4-0006fx-TR for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 12:16:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdQn3-0006YL-TY for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 12:16:51 -0500 Received: from mail-iw0-f169.google.com ([209.85.214.169]:54820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdQn3-0006YA-QR for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 12:16:49 -0500 Received: by iwn40 with SMTP id 40so1899424iwn.0 for ; Thu, 13 Jan 2011 09:16:49 -0800 (PST) In-Reply-To: <8762tsd9gg.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org --===============1106486245== Content-Type: multipart/alternative; boundary=000325575252a28b170499bd7b06 --000325575252a28b170499bd7b06 Content-Type: text/plain; charset=ISO-8859-1 thanks. also, when trying to detangle my code, i found another bug. In the functions org-babel-tangle-jump-to--org and org-babel-detangle, it uses org-bracket-link-analytic-regexp to search for the [[file:]] links. However, it does not include the comment in the regex (";;" in clojure), so somehow [[name val]] in my code is matched as a link, and then it fails to detangle. Also, related, it doesnt include the comment in the regex to find the end of the block, it just does (concat " " (regexp-quote block-name) " ends here"). Since i only want to detangle clojure code, i simply put this in my .emacs file to fix it (setq org-bracket-link-analytic-regexp (concat ";;[ ]*" "\\[\\[" "\\(\\(" (mapconcat 'regexp-quote org-link-types "\\|") "\\):\\)?" "\\([^]]+\\)" "\\]" "\\(\\[" "\\([^]]+\\)" "\\]\\)?" "\\]" )) I suppose one would have to customize the first two comments per language. --000325575252a28b170499bd7b06 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable thanks. also, when trying to detangle my code, i found another bug.
In the functions=A0org-babel-tangle-jump-to--org and=A0org-babe= l-detangle, it uses=A0=A0org-bracket-link-analytic-regexp to search for the= [[file:]] links. However, it does not include the comment in the regex (&q= uot;;;" in clojure), so somehow [[name val]] in my code is matched as = a link, and then it fails to detangle.
Also, related, it doesnt include the comment in the regex to find the = end of the block, it just does=A0(concat " " (regexp-quote block-= name) " ends here").

Since i only want t= o detangle clojure code, i simply put this in my .emacs file to fix it
=A0(setq org-bracket-link-analytic-regexp=A0
(concat ";;[ ]*= "
= "\\[\\["
&quo= t;\\(\\(" (mapconcat 'regexp-quote org-link-types "\\|")= "\\):\\)?"
"\\([^]]+\\)"
&quo= t;\\]"
"\\(\\[" "\\([^]]+\\)" "\\]\\)?"=
&quo= t;\\]"
=A0))

I suppose one wo= uld have to customize the first two comments per language.=A0
--000325575252a28b170499bd7b06-- --===============1106486245== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1106486245==--