[CLJ-695] pprint does not respect *print-length* Created: 18/Dec/10 Updated: 01/Mar/13 Resolved: 31/Dec/10
|Fix Version/s:||Release 1.3|
|Patch:||Code and Test|
pprint does not respect print-length – instead it prints ellipses for every element one length is passed (and prints forever on infinite collections).
|Comment by Stuart Halloway [ 18/Dec/10 3:14 PM ]|
The attached patch is part of a possible fix. Issues to run down:
|Comment by Tom Faulhaber [ 21/Dec/10 2:36 AM ]|
Hmm, looks like I broke some logic when I hand unrolled the original cl-format based dispatch to get better performance for lists, vectors, and maps. (Really I shouldn't have to do this, but I need to make cl-format itself generate code rather than threaded functions which are slow and tend to blow your stack. Haven't gotten around to that yet, though so the hand-coded versions are stop-gaps.)
I'm not digging the patch too much, though, for 3 reasons:
1) It breaks sets and arrays, which work in master.
I'll try to take a stab at a patch that fits a little better with what I'm trying to do in the next couple of days.
|Comment by Tom Faulhaber [ 22/Dec/10 3:13 AM ]|
This fixes the the issue with hand-rolled dispatch functions and provides a macro to help other users do it correctly as well.
|Comment by Stuart Halloway [ 22/Dec/10 9:03 PM ]|
Second patch is good. This is more important because apparently the IDE REPLs use pprint by default.