From: Johannes Brauer <brauer@nordakademie.de>
To: Rodrigo Morales <moralesrodrigo1100@gmail.com>
Cc: "Juan Manuel Macías" <maciaschain@posteo.net>,
orgmode <emacs-orgmode@gnu.org>
Subject: Re: appearance of list as results from evaluating code blocks
Date: Thu, 24 Jun 2021 10:46:03 +0000 [thread overview]
Message-ID: <35166BE0-BC41-41C6-A250-0855B3E68201@nordakademie.de> (raw)
In-Reply-To: <87zgvgs2q3.fsf@gmail.com>
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 <moralesrodrigo1100@gmail.com>:
>
> Johannes Brauer <brauer@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
next prev parent reply other threads:[~2021-06-24 11:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 19:27 appearance of list as results from evaluating code blocks Johannes Brauer
2021-06-23 19:43 ` Juan Manuel Macías
2021-06-23 20:03 ` Johannes Brauer
2021-06-23 21:13 ` Rodrigo Morales
2021-06-23 21:14 ` Rodrigo Morales
2021-06-23 21:24 ` George Mauer
2021-06-24 10:46 ` Johannes Brauer [this message]
2021-06-24 11:28 ` Eric S Fraga
-- strict thread matches above, loose matches on Subject: below --
2021-06-24 14:23 Johannes Brauer
2021-06-24 16:28 ` John Kitchin
2021-06-24 17:47 ` Johannes Brauer
2021-06-25 16:16 ` John Kitchin
2021-06-26 7:48 ` Tim Cross
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=35166BE0-BC41-41C6-A250-0855B3E68201@nordakademie.de \
--to=brauer@nordakademie.de \
--cc=emacs-orgmode@gnu.org \
--cc=maciaschain@posteo.net \
--cc=moralesrodrigo1100@gmail.com \
/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).