From: Phill Wolf <phill.wolf@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-clojure - How to emit an example block?
Date: Sat, 8 Feb 2014 15:48:56 -0500 [thread overview]
Message-ID: <CAH+qJsLgxCSp_y9cNP+BbaUP2wKY3kt6YBX7GLew6722Wb6xoQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
How can a Clojure source block contribute its standard-output results as an
example block? I tried ":results output org" but it expressed the standard
output as a quoted string with \n's where I expected newlines. For a point
of comparison, org-python seems to be able to do what I want, if "begin_src
org" is effectively the same as "begin_example". (Is it?)
#+BEGIN_SRC clojure :results output org :exports both
(println "Hello")
(println "world")
#+END_SRC
#+RESULTS:
#+BEGIN_SRC org
"Hello\nworld\n"
#+END_SRC
#+BEGIN_SRC python :results output org :exports both
print "Hello"
print "world"
#+END_SRC
#+RESULTS:
#+BEGIN_SRC org
Hello
world
#+END_SRC
[-- Attachment #2: Type: text/html, Size: 864 bytes --]
next reply other threads:[~2014-02-08 20:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-08 20:48 Phill Wolf [this message]
2014-02-08 22:15 ` org-clojure - How to emit an example block? Thomas S. Dye
2014-02-08 23:29 ` Phill Wolf
2014-02-09 7:57 ` Bastien
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=CAH+qJsLgxCSp_y9cNP+BbaUP2wKY3kt6YBX7GLew6722Wb6xoQ@mail.gmail.com \
--to=phill.wolf@gmail.com \
--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).