I am trying to jump to the definition of a function, and got this running SBCL. Any idea what this could be?
#<SB-SYS:FD-STREAM for "file /home/jonathon/.sbcl/site/cl-pdf/pdf-geom.lisp" {B799D51}> is closed. [Condition of type SIMPLE-ERROR]
Restarts: 0: [ABORT-REQUEST] Abort handling SLIME request. 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" {B78D109}>)
Backtrace: 0: (SB-KERNEL:CLOSED-FLAME #<SB-SYS:FD-STREAM for "file /home/jonathon/.sbcl/site/cl-pdf/pdf-geom.lisp" {B799D51}>) 1: ((LAMBDA (CONDITION STREAM)) #<SB-INT:STREAM-DECODING-ERROR {B79A7A9}> #<SB-PRETTY:PRETTY-STREAM {B79AB79}>) 2: (SB-PRETTY:OUTPUT-PRETTY-OBJECT #<SB-INT:STREAM-DECODING-ERROR {B79A7A9}> #<SB-IMPL::STRING-OUTPUT-STREAM {B79AAB9}>) 3: (PRINC #<SB-INT:STREAM-DECODING-ERROR {B79A7A9}> #<SB-IMPL::STRING-OUTPUT-STREAM {B79AAB9}>) 4: (SB-FORMAT::A-FORMAT-DIRECTIVE-INTERPRETER #<SB-IMPL::STRING-OUTPUT-STREAM {B79AAB9}> #<~A> NIL #<unavailable argument> (#<SB-INT:STREAM-DECODING-ERROR {B79A7A9}>)) 5: (SB-FORMAT::INTERPRET-DIRECTIVE-LIST #<SB-IMPL::STRING-OUTPUT-STREAM {B79AAB9}> (#<~A>) (#<SB-INT:STREAM-DECODING-ERROR {B79A7A9}>) (#<SB-INT:STREAM-DECODING-ERROR {B79A7A9}>)) 6: (SB-FORMAT::%FORMAT #<SB-IMPL::STRING-OUTPUT-STREAM {B79AAB9}> "Error: ~A" (#<SB-INT:STREAM-DECODING-ERROR {B79A7A9}>) (#<SB-INT:STREAM-DECODING-ERROR {B79A7A9}>)) 7: (FORMAT NIL "Error: ~A")
-Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??"
On Mon, Jan 16, 2006 at 11:48:07PM +0000, Jonathon McKitrick wrote:
I am trying to jump to the definition of a function, and got this running SBCL. Any idea what this could be?
At a guess the Lisp file that contains the definition you're trying to view is using a different encoding than your default locale. Does the following patch fix your problem?
Index: swank-sbcl.lisp =================================================================== RCS file: /project/slime/cvsroot/slime/swank-sbcl.lisp,v retrieving revision 1.151 diff -u -r1.151 swank-sbcl.lisp --- swank-sbcl.lisp 5 Dec 2005 23:01:50 -0000 1.151 +++ swank-sbcl.lisp 17 Jan 2006 19:14:17 -0000 @@ -444,12 +444,18 @@ (list (list* (getf *definition-types* type) name (sb-introspect::definition-source-description source-location)) - (if *debug-definition-finding* - (make-definition-source-location source-location type name) - (handler-case (make-definition-source-location source-location - type name) - (error (e) - (list :error (format nil "Error: ~A" e))))))) + (block test + (if *debug-definition-finding* + (make-definition-source-location source-location type name) + (handler-bind + ((sb-int:stream-decoding-error + (lambda (e) + (invoke-restart 'sb-int:attempt-resync))) + (error + (lambda (e) + (return-from test + (list :error (format nil "Error: ~A" e)))))) + (make-definition-source-location source-location type name))))))
(defun make-definition-source-location (definition-source type name) (with-struct (sb-introspect::definition-source-
On Tue, Jan 17, 2006 at 09:27:00PM +0200, Juho Snellman wrote: : On Mon, Jan 16, 2006 at 11:48:07PM +0000, Jonathon McKitrick wrote: : > I am trying to jump to the definition of a function, and got this running : > SBCL. Any idea what this could be? : : At a guess the Lisp file that contains the definition you're trying to : view is using a different encoding than your default locale. Does the : following patch fix your problem?
Brilliant! It seems to work. Thanks!
-Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??"