[slime-devel] Float representation problem

Stas Boukarev stassats at gmail.com
Wed Jul 22 10:57:13 UTC 2009

Christian Lynbech <christian at defun.dk> writes:

> I  just  stumbled  upon  a  problem  with  fuzzy  completion.  This  was
> investigated using a  freshly updated slime from CVS  and SBCL 1.0.28 on
> an intel mac.
> If one adds 
>     (setq *read-default-float-format* 'double-float)
> to .sbclrc, deletes ~/.slime and then restart the slime session,
> completion stops working. One gets an error such as this (in emacs):
>     Debugger entered--Lisp error: (error "Format specifier doesn't match argument type")
>       format(" %s %-8.2f" "-f--t---" "42.67858333333333d0")
>       (insert (format " %s %-8.2f" classification-string score))
> Apparently, due to float type differences that I can not quite
> understand, the scores reported from the cl side now includes the "d0"
> specifier for a single float which emacs then interprets as a symbol
> rather than a number.

This is because threads do not inherit bindings, so in all threads
started by slime *read-default-float-format* is bound to SINGLE-FLOAT,
while in the parent thread it is DOUBLE-FLOAT.

With best regards, Stas.

More information about the slime-devel mailing list