Subject: bug#17657: closed (Re: bug#17657: pretty-print #:width values above 49 don't work?)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 21 Jun 2016 14:48:02 +0000

Your bug report

#17657: pretty-print #:width values above 49 don't work?

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17657: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17657
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17657: pretty-print #:width values above 49 don't work?
From: Andy Wingo <[email-masked]>
To: Mark H Weaver <[email-masked]>
Cc: Mark Polesky <[email-masked]>, [email-masked]
Date: Tue, 21 Jun 2016 16:47:20 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi :)

On Sun 01 Jun 2014 20:40, Mark H Weaver <[email-masked]> writes:

> Mark Polesky <[email-masked]> writes:
>> Neither example below should be line-wrapped, but the second one 
>> is.
>
> Our pretty printer, inherited from SLIB and originally written by Marc
> Feeley, uses a great many heuristics to make formatting decisions.
> These heuristics are undocumented and subject to change.
>
> One of its heuristics is that individual expressions shall not be more
> than 49 columns wide.  Notice that pretty-print.scm includes the
> following internal definition:
>
>   (define max-expr-width 50)
>
> (although in fact the maximum width ends up being 49)
>
>> Is there a workaround?
>
> A couple of years ago I added an undocumented #:max-expr-width keyword
> argument to pretty-print, in order to improve the formatting of
> psyntax-pp.scm.  You could use that.

Just pushed some documentation, so this bug is done.

> It would be good to redesign and rewrite our pretty-printer from scratch
> at some point.

Yes!

Andy

Subject: pretty-print #:width values above 49 don't work?
From: Mark Polesky <[email-masked]>
To: [email-masked]
Date: Sat, 31 May 2014 11:24:12 -0700 (PDT)
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Neither example below should be line-wrapped, but the second one 
is.  It looks like pretty-print #:width values above 49 don't
work.  Is there a workaround?

(pretty-print
  '(234 . "901234567890123456789012345678901234567")
  #:width 49) 
=>
(234 . "901234567890123456789012345678901234567")

(pretty-print
  '(234 . "9012345678901234567890123456789012345678")
  #:width 50) 
=>
(234
 .
 "9012345678901234567890123456789012345678")

$ ./config.guess
x86_64-unknown-linux-gnu

$ guile --version
Guile 1.8.8

Thanks!
- Mark