From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phill Wolf Subject: org-clojure - How to emit an example block? Date: Sat, 8 Feb 2014 15:48:56 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bf0de7a32c3f104f1eb3c16 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCEpe-0000E5-PJ for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 15:48:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCEpe-0008Np-03 for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 15:48:58 -0500 Received: from mail-qa0-x231.google.com ([2607:f8b0:400d:c00::231]:33223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCEpd-0008Nl-PK for emacs-orgmode@gnu.org; Sat, 08 Feb 2014 15:48:57 -0500 Received: by mail-qa0-f49.google.com with SMTP id w8so7253578qac.8 for ; Sat, 08 Feb 2014 12:48:56 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --047d7bf0de7a32c3f104f1eb3c16 Content-Type: text/plain; charset=UTF-8 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 --047d7bf0de7a32c3f104f1eb3c16 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
How can a Clojure source block contribute its standar= d-output results as an example block?=C2=A0 I tried ":results output o= rg" but it expressed the standard output as a quoted string with \n= 9;s where I expected newlines.=C2=A0 For a point of comparison, org-python = seems to be able to do what I want, if "begin_src org" is effecti= vely the same as "begin_example".=C2=A0 (Is it?)

#+BEGIN_SRC clojure :results output org :exports both
(println= "Hello")
(println "world")
#+END_SRC

#+RE= SULTS:
#+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


--047d7bf0de7a32c3f104f1eb3c16--