emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Scheme output results


From: Neil Jerram
Subject: Re: [O] Scheme output results
Date: Sun, 20 Aug 2017 17:43:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 23/07/17 09:52, Nicolas Goaziou wrote:
Hello,

Neil Jerram <address@hidden> writes:

I don't think that Scheme output results are correctly handled. Please
consider:

#+BEGIN_SRC scheme :results output
(display "a") (newline)
(display "b") (newline)
(display "c") (newline)
'(a b c)
#+END_SRC


#+RESULTS: : "a\nb\nc\n"

As compared with the Elisp equivalent:

#+BEGIN_SRC elisp :results output
(princ "a") (terpri)
(princ "b") (terpri)
(princ "c") (terpri)
'(a b c)
#+END_SRC

#+RESULTS:
: a
: b
: c

I have a possible fix for this - on another computer, so not to hand
right now - but thought it would be check first whether you agree with
me that the Scheme results should be more like the Elisp ones.
That sounds like a good idea. Could you send your fix as a proper patch
with a commit message?

Thank you!

Regards,

With apologies for the slow follow up, attached is a patch that works well for me.

I think a concern with it would be whether the Geiser retort object and functions have always existed, and whether we can rely on them continuing to exist. But - at least for me - every Scheme evaluation was previously giving "An error occurred", because of an unexpected extra "Mark set" message, so I am pretty sure that my patch is an improvement.

I guess (following any revisions) you will also need assignment papers. I believe I have these on file for Guile already (since about 1990), and it's possible that those are worded so as to cover Emacs as well. Would you mind checking, as I've forgotten how to do that myself?

Regards - Neil

Attachment: 0001-Improve-Scheme-code-evaluation.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]