* bug#17657: pretty-print #:width values above 49 don't work?
@ 2014-05-31 18:24 Mark Polesky
2014-06-01 18:40 ` Mark H Weaver
0 siblings, 1 reply; 4+ messages in thread
From: Mark Polesky @ 2014-05-31 18:24 UTC (permalink / raw)
To: 17657
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17657: pretty-print #:width values above 49 don't work?
2014-05-31 18:24 bug#17657: pretty-print #:width values above 49 don't work? Mark Polesky
@ 2014-06-01 18:40 ` Mark H Weaver
2014-06-03 18:06 ` Mark Polesky
2016-06-21 14:47 ` Andy Wingo
0 siblings, 2 replies; 4+ messages in thread
From: Mark H Weaver @ 2014-06-01 18:40 UTC (permalink / raw)
To: Mark Polesky; +Cc: 17657
Mark Polesky <markpolesky@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.
It would be good to redesign and rewrite our pretty-printer from scratch
at some point.
> $ guile --version
> Guile 1.8.8
We no longer support Guile 1.8.x. You should transition to 2.0.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17657: pretty-print #:width values above 49 don't work?
2014-06-01 18:40 ` Mark H Weaver
@ 2014-06-03 18:06 ` Mark Polesky
2016-06-21 14:47 ` Andy Wingo
1 sibling, 0 replies; 4+ messages in thread
From: Mark Polesky @ 2014-06-03 18:06 UTC (permalink / raw)
To: Mark H Weaver; +Cc: 17657
Mark H Weaver wrote:
> 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.
Nice, but why leave it undocumented? That's useful!
Anyway, I can't use it yet: my project still depends on
1.8.8, and I see that you added it in 2.0.6.
> We no longer support Guile 1.8.x. You should transition
> to 2.0.
We are well aware, but the developers who are working on it
keep mentioning problems with curried definitions, saying
things like "stabbing around in the dark around bugs and
undocumented areas", and that the stable version doesn't
seem so stable... In any case, the task of transitioning to
2.0 is beyond my own expertise, so I'll just see how it
plays out.
But thank you for your explanation, advice, and quick
response.
- Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#17657: pretty-print #:width values above 49 don't work?
2014-06-01 18:40 ` Mark H Weaver
2014-06-03 18:06 ` Mark Polesky
@ 2016-06-21 14:47 ` Andy Wingo
1 sibling, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2016-06-21 14:47 UTC (permalink / raw)
To: Mark H Weaver; +Cc: Mark Polesky, 17657-done
Hi :)
On Sun 01 Jun 2014 20:40, Mark H Weaver <mhw@netris.org> writes:
> Mark Polesky <markpolesky@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-21 14:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-31 18:24 bug#17657: pretty-print #:width values above 49 don't work? Mark Polesky
2014-06-01 18:40 ` Mark H Weaver
2014-06-03 18:06 ` Mark Polesky
2016-06-21 14:47 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).