emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Error evaluating dot code via variable


From: Loris Bennett
Subject: [O] Error evaluating dot code via variable
Date: Tue, 03 Jul 2012 12:20:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi,

If I have something like

,-------------------------------------------
| #+name: dot-code
| #+begin_src perl :results output :cache no
| print <<END;
| digraph G {
| overlap=false
| "Node\\nA"
| "Node\\nB"
| Core -> "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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]