unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Mark Polesky <markpolesky@yahoo.com>
Cc: 17657@debbugs.gnu.org
Subject: bug#17657: pretty-print #:width values above 49 don't work?
Date: Sun, 01 Jun 2014 14:40:56 -0400	[thread overview]
Message-ID: <87vbsk322v.fsf@yeeloong.lan> (raw)
In-Reply-To: <1401560652.32669.YahooMailBasic@web185302.mail.gq1.yahoo.com> (Mark Polesky's message of "Sat, 31 May 2014 11:24:12 -0700 (PDT)")

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





  reply	other threads:[~2014-06-01 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-06-03 18:06   ` Mark Polesky
2016-06-21 14:47   ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbsk322v.fsf@yeeloong.lan \
    --to=mhw@netris.org \
    --cc=17657@debbugs.gnu.org \
    --cc=markpolesky@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).