emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Straight recursive fact prints in floating-point in org-babel bu


From: Nick Dokos
Subject: Re: [O] Straight recursive fact prints in floating-point in org-babel but not in REPL
Date: Sat, 05 Dec 2015 22:13:01 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.1.50 (gnu/linux)

Brian Beckman <address@hidden> writes:

> Org-babel seems to print SLIME / SBCL bignums as floating point, at least in
> this gist (please see
> https://gist.github.com/rebcabin/f73cecd3c9b7da6218e9).  I'd like to be able
> to control whether bignums are printed out in full.  Any advice for me?
>

I think this happens because babel turns result strings into elisp
objects, using (read ...).

This has two consequences: the string has to be legal emacs-lisp (that
causes problems with e.g. scheme evaluators which return things like #t
and #f on which the elisp reader chokes; note also the conversion of
lisp-vector-to-list in ob-lisp.el which is done to avoid similar
problems); it also does violence to some strings as you have observed -
e.g. try

(read "123456789123456789123456789")
1.2345678912345679e+26

I'm not sure whether the (read ...) is required in order for babel
to work correctly, or whether it is a bug. I've wanted to look into
this for a while now (ever since Lawrence Bottorff reported the #t
problem with scheme), but I have not been able to find any time to
do so.

-- 
Nick




reply via email to

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