[slime-devel] External format problems with latest CVS slime and SBCL [was: Daily ChangeLog diff]

Holger Duerer H.Duerer at gmx.net
Tue Nov 21 11:10:51 UTC 2006

>>>>> "MB" == Marco Baringer <mbaringer at common-lisp.net> writes:

    MB> Index: slime/ChangeLog
    MB> diff -u slime/ChangeLog:1.1001 slime/ChangeLog:1.1002
    MB> --- slime/ChangeLog:1.1001	Sun Nov 12 06:18:57 2006
    MB> +++ slime/ChangeLog	Sun Nov 19 16:25:15 2006
    MB> @@ -1,3 +1,35 @@
    MB> +2006-11-19  Helmut Eller  <heller at common-lisp.net>
    MB> +	* swank-backend.lisp (find-external-format)
    MB> +	(guess-external-format): New.
    MB> +	(swank-compile-file): The external-format argument is now a
    MB> +	backend specific value returned by find-external-format.
    MB> +
    MB> +	* swank-cmucl.lisp, swank-sbcl.lisp, swank-clisp,
    MB> +	swank-lispworks.lisp, swank-allegro.lisp, swank-corman.lisp,
    MB> +	swank-ecl.lisp, swank-scl.lisp, swank-abcl.lisp, swank-openmcl:
    MB> +	Update implementations accordingly.
    MB> +

Not sure if these changes caused my problems but it seems likely.  

I only infrequently update my local copy of slime from CVS (usually
when a new SBCL is installed) and yesterday was such a day.  After
that, slime wouldn't start up again failing with some unknown encoding
format :ISO-LATIN-1-UNIX.

After some digging I came up with the patch below and things are
working again.  (Summary: find-external-format is being passed a
symbol but seems to expect a string.)


--- swank-sbcl.lisp	19 Nov 2006 21:33:03 -0000	1.171
+++ swank-sbcl.lisp	21 Nov 2006 10:18:19 -0000
@@ -138,8 +138,11 @@
     (:us-ascii "us-ascii" "us-ascii-unix")))
 (defimplementation find-external-format (coding-system)
-  (car (rassoc-if (lambda (x) (member coding-system x :test #'equal))
-                  *external-format-to-coding-system*)))
+  (let ((coding-system (if (symbolp coding-system)
+                           (string-downcase (symbol-name coding-system))
+                           coding-system)))
+    (car (rassoc-if (lambda (x) (member coding-system x :test #'equal))
+                    *external-format-to-coding-system*))))
 (defun make-socket-io-stream (socket external-format buffering)
   (sb-bsd-sockets:socket-make-stream socket

More information about the slime-devel mailing list