From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: pretty-print for 1+
Date: Tue, 17 Sep 2013 12:02:15 +0200 [thread overview]
Message-ID: <87fvt3hil4.fsf@gnu.org> (raw)
In-Reply-To: CAMPwXzRS5x-eM5Owu_aX+yWDgrYkUfB648Xw7=QiKUzjV=U+Tw@mail.gmail.com
Brian Killian <brian.c.killian@gmail.com> skribis:
> On Thu, Sep 12, 2013 at 6:04 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Brian Killian <brian.c.killian@gmail.com> skribis:
>>
>> > Using guile 2.0.9 and the ice-9 pretty-print module, when I apply:
>> >
>> > (pretty-print '(1+ 1))
>> >
>> > I get:
>> >
>> > (#{1+}# 1)
>> >
>> > I was expecting:
>> >
>> > (1+ 1)
>> >
>> > Is this an issue with pretty-print or should I adjust my expectation?
>>
>> I think it’s an issue with ‘write’. Specifically,
>> ‘INITIAL_IDENTIFIER_MASK’ in print.c doesn’t quite match the syntax
>> recognized by ‘read’.
>>
>> Ludo’.
>>
>>
>>
> Thank you for the information. I'm using (+ arg 1) instead of (1+ arg) as a
> workaround.
Well note that (#{1+}# 1) is valid and equivalent to (1+ 1).
> I'm using pretty-print to format code snippets as I work through SICP,
> which is becoming tedious. Do you know of a script or tool that formats
> Scheme files using the pretty-print rules? I've switched from gedit to
> Emacs as an editor, but Emacs only seems to indent things properly, rather
> than stripping extraneous newlines and trying to fit expressions on one
> line if possible like pretty-print does.
Good question, I don’t know of any such tool.
Ludo’.
next prev parent reply other threads:[~2013-09-17 10:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 18:31 pretty-print for 1+ Brian Killian
2013-09-12 22:04 ` Ludovic Courtès
2013-09-14 20:06 ` Brian Killian
2013-09-17 10:02 ` Ludovic Courtès [this message]
2013-09-18 3:27 ` Chaos Eternal
2013-09-18 18:57 ` Taylan Ulrich B.
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=87fvt3hil4.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-user@gnu.org \
/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).