all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Babel] Reporting 2 problems of code execution
@ 2010-11-28 20:04 Sébastien Vauban
  2010-11-29  4:34 ` Charles C. Berry
  0 siblings, 1 reply; 10+ messages in thread
From: Sébastien Vauban @ 2010-11-28 20:04 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

#+TITLE:     2 problems with executing block codes
#+DATE:      2010-11-28
#+LANGUAGE:  en

Hi Eric and Dan,

* Abstract

Reporting two problems:

1. parsing problem of unescaped text from a shell block
2. end marker repeated upon execution of elisp block

Note that I added the RESULT thing in my default headers.

* Data

Let's say I want to grep trough arbitrary text, such as:

#+results:a-couple-of-lines
: He said "I'll do it"
: but that cannot be echo'ed!

... or to let it scanned by AWK for post-processing (like generating some DOT
representation).

But, first, as errors are popping up, let's say I can just output it as is.

* Shell code

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

#+results:
#+BEGIN_RESULT
#+END_RESULT

The data is impossible (*for me*, as is) to print out from a shell code.
Though, it is in Emacs-Lisp... without any change.

Note that it's the second *single quote* only that's causing a problem, not
the first one...

* Emacs-Lisp code

Executing this:

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

#+results:
#+BEGIN_RESULT
#+begin_example
"He said \"I'll do it\"
but that cannot be echoed!"
#+END_RESULT#+end_example
#+end_example
#+end_example
#+end_example
#+end_example
#+end_example
#+end_example
#+end_example
#+end_example

works, but the *end marker is repeated* as long as we re-execute the block.

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-12-05 15:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-28 20:04 [Babel] Reporting 2 problems of code execution Sébastien Vauban
2010-11-29  4:34 ` Charles C. Berry
2010-11-29  9:03   ` Sébastien Vauban
2010-11-29 16:47     ` Charles C. Berry
2010-11-29 19:49     ` Dan Davison
2010-11-30  2:03     ` Eric Schulte
2010-12-02  9:35       ` Sébastien Vauban
2010-12-02 19:40         ` Eric Schulte
2010-12-02 19:58           ` Sébastien Vauban
2010-12-05 15:39             ` Eric Schulte

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.