From: "Berry, Charles" <ccberry@ucsd.edu>
To: Jarmo Hurri <jarmo.hurri@iki.fi>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: BUG in ob-scheme WAS: Re: Babel: verbatim results yield a table
Date: Thu, 2 Aug 2018 17:08:36 +0000 [thread overview]
Message-ID: <D33E1836-7492-4BE7-820C-DCCC61BFD2A5@ucsd.edu> (raw)
In-Reply-To: <877el9arlx.fsf@iki.fi>
> On Aug 2, 2018, at 5:19 AM, Jarmo Hurri <jarmo.hurri@iki.fi> wrote:
>
>
> Greetings.
>
> The org manual states that in the :results header argument of a block
>
> verbatim Interpret literally and insert as quoted text. Do not create a
> table. Usage example: :results value verbatim
Unfortunately, `org-babel-scheme--table-or-string' does not honor :results verbatim. :-(
>
> The quote above is from https://orgmode.org/manual/results.html
>
> Given this description, I am trying to understand the result below from
> a Scheme snippet (this is an exercise in the good old SICP). In
> particular, why is the table created from the (nested) list?
>
> Jarmo
>
> #+BEGIN_SRC scheme :exports both :results value verbatim
> (define (deep-reverse lst)
> (define (deep-iter lst result)
> (if (null? lst)
> result
> (let ((first (car lst)) (rest (cdr lst)))
> (deep-iter rest
> (cons (if
> (pair? first)
> (deep-reverse first)
> first)
> result)))))
> (deep-iter lst '()))
>
> (deep-reverse (list (list 1 2 3 4) (list (list 5 6) 7 8)))
> #+END_SRC
>
> #+RESULTS:
> | 8 | 7 | (6 5) | |
> | 4 | 3 | 2 | 1 |
>
HTH,
Chuck
next prev parent reply other threads:[~2018-08-02 17:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 12:19 Babel: verbatim results yield a table Jarmo Hurri
2018-08-02 17:08 ` Berry, Charles [this message]
2018-08-03 6:05 ` BUG in ob-scheme WAS: " Jarmo Hurri
2018-08-03 9:01 ` Jarmo Hurri
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D33E1836-7492-4BE7-820C-DCCC61BFD2A5@ucsd.edu \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=jarmo.hurri@iki.fi \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.