Clojure

(pprint-newline :fill) is not handled correctly

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: Backlog
  • Component/s: None
  • Labels:
  • Approval:
    Vetted

Description

Filled pretty printing (where we try to fit as many elements on a line as possible) is being too aggressive as we can see when we try to print the following array:

user> (binding [*print-right-margin* 20] (pprint (int-array (range 10))))

Produces:

[0,
1,
2,
3,
4, 5, 6, 7, 8, 9]

Rather than

[0, 1, 2, 3, 4,
5, 6, 7, 8, 9]

or something like that. (I haven't worked through the exact correct representation for this case).

We currently only use :fill style newlines for native java arrays.

Activity

Hide
Stuart Halloway added a comment -

Tom, this patch doesn't apply, and I am not sure why. Can you take a look?

Show
Stuart Halloway added a comment - Tom, this patch doesn't apply, and I am not sure why. Can you take a look?
Hide
Rich Hickey added a comment -

Is this current?

Show
Rich Hickey added a comment - Is this current?
Hide
Assembla Importer added a comment -

tomfaulhaber said: This patch was attached to the wrong bug. It should be attached to bug #347. There is no fix for this bug yet.

Show
Assembla Importer added a comment - tomfaulhaber said: This patch was attached to the wrong bug. It should be attached to bug #347. There is no fix for this bug yet.
Hide
Assembla Importer added a comment -

stu said: The second patch includes the first, and adds another test.

Show
Assembla Importer added a comment - stu said: The second patch includes the first, and adds another test.
Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - stu said: [file:diLxv6y4Sr35GVeJe5cbLr]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: