Comment 3 for bug 1985814

Revision history for this message
Douglas Katzman (dougk) wrote :

I think this is not the first bug report suggesting that the deletion of explicit spaces coming from printing of a character preceding a pprint-newline is a silly notion. I agree but note that *PRINT-READABLY* meets this particular need in requiring readable printing, versus *print-escape* which just "encourages" the printer to use syntactic markers that would otherwise be absent.

* (let ((*print-pretty* t) (*print-readably* t)) (progn (print (concatenate 'list (make-list 30 :initial-element #\space))) t))

(#\Space #\Space #\Space #\Space #\Space #\Space #\Space #\Space #\Space
 #\Space #\Space #\Space #\Space #\Space #\Space #\Space #\Space #\Space
 #\Space #\Space #\Space #\Space #\Space #\Space #\Space #\Space #\Space
 #\Space #\Space #\Space)

I think the real glitch in the spec is that if *not* printing with #\\ notation there is no way to not have space characters be eliminated before a newline when they were not merely incidental whitespace, but actually part of what you really wanted to output. It seems strange.
That said, I'm not opposed to changing the pretty-print-dipsatch entry for CHARACTER when using *print-escape* = T