From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Loris Bennett" Subject: Error evaluating dot code via variable Date: Tue, 03 Jul 2012 12:20:59 +0200 Message-ID: <87zk7hcfhw.fsf@slate.zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm0ET-0002eI-2r for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 06:21:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm0EM-0005zT-Po for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 06:21:20 -0400 Received: from plane.gmane.org ([80.91.229.3]:40701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm0EM-0005zA-Iq for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 06:21:14 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sm0EI-0007tm-T6 for emacs-orgmode@gnu.org; Tue, 03 Jul 2012 12:21:10 +0200 Received: from slate.zedat.fu-berlin.de ([160.45.11.34]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Jul 2012 12:21:10 +0200 Received: from loris.bennett by slate.zedat.fu-berlin.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 Jul 2012 12:21:10 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, If I have something like ,------------------------------------------- | #+name: dot-code | #+begin_src perl :results output :cache no | print < "Node\\nA" | Core -> "Node\\nB" | } | END | | #+end_src | | #+header: :var input=dot-code | #+header: :file tmp.pdf | #+header: :cmdline -Kneato -Tpdf | #+begin_src dot :exports both :cache yes | $input | #+end_src `------------------------------------------- I get the following error when evaluating the second block: ,----------------------------------------------------------------- | executing Perl code block (dot-code)... | "digraph G { | overlap=false | \"Node\\nA\" | \"Node\\nB\" | Core -> \"Node\\nA\" | Core -> \"Node\\nB\" | } | " | executing Dot code block... | replace-regexp-in-string: Invalid use of `\' in replacement text `----------------------------------------------------------------- If I paste the output of the first block into its own src block, like this: ,---------------------------------------- | #+header: :file tmp.pdf | #+header: :cmdline -Kneato -Tpdf | #+begin_src dot :exports both :cache no | digraph G { | overlap=false | "Node\nA" | "Node\nB" | Core -> "Node\nA" | Core -> "Node\nB" | } | #+end_src `---------------------------------------- I get no error on execution. If I replace '\\n' with ' X ', i.e. something without '\', in the first block, the error seen when using the variable $input does not occur. I'm using Emacs 23.2.1 and Org 7.8.11. Is this a known issue? Cheers Loris -- Loris Bennett