From: "Loris Bennett" <loris.bennett@fu-berlin.de>
To: emacs-orgmode@gnu.org
Subject: Error evaluating dot code via variable
Date: Tue, 03 Jul 2012 12:20:59 +0200 [thread overview]
Message-ID: <87zk7hcfhw.fsf@slate.zedat.fu-berlin.de> (raw)
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 other threads:[~2012-07-03 10:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zk7hcfhw.fsf@slate.zedat.fu-berlin.de \
--to=loris.bennett@fu-berlin.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).