Pretty printer ignores STREAM-LINE-LENGTH when *PRINT-RIGHT-MARGIN* is bound to NIL

Bug #501075 reported by Levente Mészáros
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Confirmed
Low
Unassigned

Bug Description

CL-USER> *standard-output*
#<SWANK-BACKEND::SLIME-OUTPUT-STREAM {1006AC6A51}>

CL-USER> (defmethod stream-line-length ((s swank-backend::slime-output-stream))
  200)

STYLE-WARNING: redefining STREAM-LINE-LENGTH (#<STANDARD-CLASS SWANK-BACKEND::SLIME-OUTPUT-STREAM>) in DEFMETHOD
#<STANDARD-METHOD STREAM-LINE-LENGTH (SWANK-BACKEND::SLIME-OUTPUT-STREAM) {1006C0DDC1}>

CL-USER> (values *print-pretty* *print-length* *print-right-margin* *print-lines*)
T
NIL
NIL
NIL

CL-USER> (format *standard-output* "~<~A~>" (loop repeat 20 collect "foo ")) ; wraps at around 75
(foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
 foo foo foo foo foo )
NIL

;; the line-length slot in the pretty-stream structure initializes
;; (line-length (or *print-right-margin*
;; (setf cl-user::a (sb!impl::line-length (setf cl-user::s target)))
;; default-line-length)
;; :type column)
;;
;; but the call to sb-impl::line-length is made on an *intermediate* string-output-stream
;; therefore it ignores the line length customization
;;
;; there might be other similar problems like this one due to the wrapped stream

Tags: printer
Changed in sbcl:
status: New → Confirmed
importance: Undecided → Low
tags: added: printer
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.