* 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
* BUG in ob-scheme WAS: Re: Babel: verbatim results yield a table
2018-08-02 12:19 Babel: verbatim results yield a table Jarmo Hurri
@ 2018-08-02 17:08 ` Berry, Charles
2018-08-03 6:05 ` Jarmo Hurri
2018-08-03 9:01 ` Jarmo Hurri
0 siblings, 2 replies; 4+ messages in thread
From: Berry, Charles @ 2018-08-02 17:08 UTC (permalink / raw)
To: Jarmo Hurri; +Cc: emacs-orgmode@gnu.org
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: BUG in ob-scheme WAS: Re: Babel: verbatim results yield a table
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
1 sibling, 0 replies; 4+ messages in thread
From: Jarmo Hurri @ 2018-08-03 6:05 UTC (permalink / raw)
To: emacs-orgmode
"Berry, Charles" <ccberry@ucsd.edu> writes:
>> 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. :-(
Thanks, I did not have the guts to call it a bug.
I'll see if I could provide a patch for this later.
Thanks.
Jarmo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: BUG in ob-scheme WAS: Re: Babel: verbatim results yield a table
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
1 sibling, 0 replies; 4+ messages in thread
From: Jarmo Hurri @ 2018-08-03 9:01 UTC (permalink / raw)
To: emacs-orgmode
Greetings again.
"Berry, Charles" <ccberry@ucsd.edu> writes:
>> 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. :-(
I wrote a patch for this before realizing that it had already been fixed
in the master branch (I was running the stable branch).
This should teach me a lesson again... :-)
Jarmo
^ 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 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).