GNU bug report logs - #17657
pretty-print #:width values above 49 don't work?

Previous Next

Package: guile;

Reported by: Mark Polesky <markpolesky <at> yahoo.com>

Date: Sat, 31 May 2014 18:34:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 17657-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: Mark H Weaver <mhw <at> netris.org>
Cc: Mark Polesky <markpolesky <at> yahoo.com>, 17657-done <at> debbugs.gnu.org
Subject: Re: bug#17657: pretty-print #:width values above 49 don't work?
Date: Tue, 21 Jun 2016 16:47:20 +0200
Hi :)

On Sun 01 Jun 2014 20:40, Mark H Weaver <mhw <at> netris.org> writes:

> Mark Polesky <markpolesky <at> yahoo.com> 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




This bug report was last modified 9 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.