Hi Rodrigo!

Thanks a lot for the detailed information. In the meantime I’ve studied the 
org-mode manual a bit more closely (perhaps, I should have done that before 
asking my question …) and found the following interesting possibilitiy:

  #+begin_src clojure :results verbatim :wrap src clojure
(list 1 2 (+ 1 2))
  #+end_src

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

Johannes

> Am 23.06.2021 um 23:14 schrieb Rodrigo Morales <moralesrodrigo1...@gmail.com>:
> 
> Johannes Brauer <bra...@nordakademie.de> writes:
> 
> Johannes Brauer writes:
> 
>> thanks, that works
> 
> While that works, you might be interested in ":results verbatim" instead
> of ":results raw" since when using "verbatim" the results are replaced
> when re-evaluating the code block. See minimal working example below.
> 
> After pressing =C-c C-c= five times
> 
> #+BEGIN_SRC elisp :results raw
> (list 1 2 3)
> #+END_SRC
> 
> #+RESULTS:
> (1 2 3)
> (1 2 3)
> (1 2 3)
> (1 2 3)
> (1 2 3)
> 
> After pressing =C-c C-c= five times
> 
> #+BEGIN_SRC elisp :results verbatim
> (list 1 2 3)
> #+END_SRC
> 
> #+RESULTS:
> #+begin_example
> (1 2 3)
> #+end_example
> 
> PS: If you haven't customized Org Mode enough, you might get a ":" as
> the prefix of some of your results.
> 
> #+BEGIN_SRC elisp :results verbatim
> (list 1 2 3)
> #+END_SRC
> 
> #+RESULTS:
> : (1 2 3)
> 
> As can be seen above, the results are not enclosed within
> #+begin_example and #+end_example. To enable this, set the following.
> 
> #+BEGIN_SRC elisp
> (setq org-babel-min-lines-for-block-output 0)
> #+END_SRC
> 
> Once you set the option shown above, you might get the following when
> evaluating the code block.
> 
> #+BEGIN_SRC elisp :results verbatim
> (list 1 2 3)
> #+END_SRC
> 
> #+RESULTS:
> #+begin_example
> (1 2 3)
> #+end_example

Reply via email to