[Top][All Lists]

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

Re: [Orgmode] Re: [Babel] Reporting 2 problems of code execution

From: Charles C. Berry
Subject: Re: [Orgmode] Re: [Babel] Reporting 2 problems of code execution
Date: Mon, 29 Nov 2010 08:47:49 -0800

On Mon, 29 Nov 2010, Sébastien Vauban wrote:

Hi Charles,

Thanks a lot for taking a look at this, too...

"Charles C. Berry" wrote:
On Sun, 28 Nov 2010, Sébastien Vauban wrote:
Hi Eric and Dan,

* Abstract

Reporting two problems:

Did you mean to include ":results output" in the headers?

You're right that could be it. I often forget about adding that setting, even
though it's more or less mandatory for the sh blocks -- at least, in many sh
blocks I write...

When I do that in eaco of the src blocks I get what I think you were

I still don't. See below.


#+begin_src sh :results output :var data=a-couple-of-lines :exports both
echo "$data"

: He said "I'll do it"
: but that cannot be echo'ed!

It does not work for me. With the above, I (still) get:


for results, and, in the *Org-Babel Error Output*:

--8<---------------cut here---------------start------------->8---
sh: line 3: unexpected EOF while looking for matching `''
sh: line 7: syntax error: unexpected end of file
--8<---------------cut here---------------end--------------->8---

Hmmm. So it looks like 'sh' is having some trouble here.

Can you run the same code directly in the shell?

That is can you set/export $data and then 'echo $data' at the command line


#+begin_src emacs-lisp results output :var data=a-couple-of-lines :exports both
(prin1-to-string data)

: "He said \"I'll do it\"
: but that cannot be echo'ed!"

With or without the ":results output" (BTW, notice you've forgotten the colon
in front of results), the result is the same. But, if you evaluate the block
multiple times, in my case, the end marker (end_example) is still repeated...

Sorry 'bout the missing ":" - it outputs the same results either way on my box.


[rest deleted]

Charles C. Berry                            Dept of Family/Preventive Medicine
address@hidden                      UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

reply via email to

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