#+lispworks Gray slime-output-stream doesn't handle non base-chars

Bug #1175550 reported by Nick Levine
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Slime
New
Undecided
Unassigned

Bug Description

Out of the box, LW chars are base-char. This can be configured, but if it isn't then the slime-output-stream's buffer is not a base-string.

#+lispworks (lw:set-default-character-element-type 'lw:simple-char) will fix this. It needs to happen before the output-stream is made.

#\™ is not of type BASE-CHAR.
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] Quit process.

Backtrace:
  0: (CONDITIONS::CONDITIONS-ERROR :INVISIBLEP T TYPE-ERROR (:DATUM #\™ :EXPECTED-TYPE BASE-CHAR))
  1: (ERROR TYPE-ERROR :DATUM #\™ :EXPECTED-TYPE BASE-CHAR)
  2: (SYSTEM::MUMBLE-REPLACE-FROM-MUMBLE)
  3: ((SUBFUNCTION 2 (METHOD STREAM:STREAM-WRITE-STRING (SWANK-BACKEND::SLIME-OUTPUT-STREAM T))))
  4: ((SUBFUNCTION SWANK-BACKEND:CALL-WITH-LOCK-HELD (TOP-LEVEL-FORM 123)) ..)
  5: ((METHOD STREAM:STREAM-WRITE-STRING (SWANK-BACKEND::SLIME-OUTPUT-STREAM T)) ..)
  6: (SYSTEM::WRITE-STRING* "\n\nWelcome to Gendl™\n\nCopyright© 2002-2013, Genworks International, Birmingham MI, USA. \nAll Rights Reserved.\n\nThis program contains free software: you can redistribute i..
  7: (SYSTEM::SUB-FORMAT 0 771)
  8: (SYSTEM::CALL-SUB-FORMAT #<SWANK-BACKEND::SLIME-OUTPUT-STREAM 21CB69D3> 0 771)
  9: (FORMAT T ..)

Nick Levine (ndl)
tags: added: lispworks repl
Revision history for this message
Nick Levine (ndl) wrote :

Maybe a cleaner fix is to only change the string-type of the output stream buffer (and not everywhere in the current LW session), like this:

(defclass slime-output-stream (fundamental-character-output-stream)
  ((output-fn :initarg :output-fn)
   (buffer :initform (make-string 8000
                                  #+lispworks #+lispworks :element-type 'lw:simple-char
                                  ))
   (fill-pointer :initform 0)
   (column :initform 0)
   (lock :initform (make-lock :name "buffer write lock"))))

Nick Levine (ndl)
tags: added: slime-repl
removed: repl
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.