all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Babel: verbatim results yield a table
@ 2018-08-02 12:19 Jarmo Hurri
  2018-08-02 17:08 ` BUG in ob-scheme WAS: " Berry, Charles
  0 siblings, 1 reply; 4+ messages in thread
From: Jarmo Hurri @ 2018-08-02 12:19 UTC (permalink / raw)
  To: emacs-orgmode


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

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 |

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-03  9:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 12:19 Babel: verbatim results yield a table Jarmo Hurri
2018-08-02 17:08 ` BUG in ob-scheme WAS: " Berry, Charles
2018-08-03  6:05   ` Jarmo Hurri
2018-08-03  9:01   ` Jarmo Hurri

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.