emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Error evaluating dot code via variable
@ 2012-07-03 10:20 Loris Bennett
  0 siblings, 0 replies; only message in thread
From: Loris Bennett @ 2012-07-03 10:20 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-03 10:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-03 10:20 Error evaluating dot code via variable Loris Bennett

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).