emacs-orgmode
[Top][All Lists]
Advanced

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

Re: appearance of list as results from evaluating code blocks


From: John Kitchin
Subject: Re: appearance of list as results from evaluating code blocks
Date: Thu, 24 Jun 2021 12:28:46 -0400

That probably means the clojure block is returning nil as the value. I don't know what it means to return something in clojure, but here is what you have to do with Python, for example.

#+BEGIN_SRC python :results value code
[1, 2, 3]
#+END_SRC

#+RESULTS:
#+begin_src python
None
#+end_src

You have to explicitly return a value to see it.

#+BEGIN_SRC python :results value code
return [1, 2, 3]
#+END_SRC

#+RESULTS:
#+begin_src python
[1, 2, 3]
#+end_src


John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803


On Thu, Jun 24, 2021 at 10:31 AM Johannes Brauer <brauer@nordakademie.de> wrote:
What about :results code
The default is a elisp code block so you get syntax coloring

That works fore lisp:

  #+begin_src elisp :results code
(list 1 2 (+ 1 2))
  #+end_src

  #+RESULTS:
  #+begin_src elisp
  (1 2 3)
  #+end_src

But with Clojure I get

  #+begin_src clojure :results code
(list 1 2 (+ 1 2))
  #+end_src

  #+RESULTS:
  #+begin_src clojure
  nil
  #+end_src


reply via email to

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