From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brian Killian Newsgroups: gmane.lisp.guile.user Subject: Re: pretty-print for 1+ Date: Sat, 14 Sep 2013 16:06:47 -0400 Message-ID: References: <87li313de7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bdc8328d1217604e65d82dc X-Trace: ger.gmane.org 1379189219 13433 80.91.229.3 (14 Sep 2013 20:06:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Sep 2013 20:06:59 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Sep 14 22:07:02 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VKw7O-0004Ys-Ph for guile-user@m.gmane.org; Sat, 14 Sep 2013 22:06:59 +0200 Original-Received: from localhost ([::1]:54466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKw7O-0000YT-4O for guile-user@m.gmane.org; Sat, 14 Sep 2013 16:06:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKw7F-0000YM-Np for guile-user@gnu.org; Sat, 14 Sep 2013 16:06:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKw7E-000368-KR for guile-user@gnu.org; Sat, 14 Sep 2013 16:06:49 -0400 Original-Received: from mail-qe0-x235.google.com ([2607:f8b0:400d:c02::235]:53610) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKw7E-000362-Fu for guile-user@gnu.org; Sat, 14 Sep 2013 16:06:48 -0400 Original-Received: by mail-qe0-f53.google.com with SMTP id jy17so1946716qeb.26 for ; Sat, 14 Sep 2013 13:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=VmvPBEABLo5rQNQqYdKXpGsa57TECYCuJcx0ykYo+wY=; b=deuu8u6HqjDmnafg82dSMtgggp41qZcTFRN1m9+lA6zIH6RjIku5HroqzcILpSQFeb xIE/ftgnFjr/jPwG1NWFSGktib2hS4OjZ0cuQ/mYS7W75rJpcaK/07IV9bsZRTyX8evY KOQKQxNZLcds8kiejlOAY+A8wixn/0UCGQo7L0dWzlvUF5JsHl2NzU5UfvCtOYbUDrub YR6eir+xO7LjKMywcIrdth9b3SsOxvlXJCrAyOKCReD7FS8hZOjrIJSc5iNe7Uwawqsi RTWbXjh3sj8zVy4b16jOTbeodVUEc0pQ+pb+cTBpwEIQNyDoQQY/SuwYueH6VBUM66CR HvDg== X-Received: by 10.224.29.78 with SMTP id p14mr3041136qac.33.1379189207931; Sat, 14 Sep 2013 13:06:47 -0700 (PDT) Original-Received: by 10.49.16.194 with HTTP; Sat, 14 Sep 2013 13:06:47 -0700 (PDT) In-Reply-To: <87li313de7.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c02::235 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10802 Archived-At: --047d7bdc8328d1217604e65d82dc Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Thu, Sep 12, 2013 at 6:04 PM, Ludovic Court=E8s wrote: > Brian Killian 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=92s an issue with =91write=92. Specifically, > =91INITIAL_IDENTIFIER_MASK=92 in print.c doesn=92t quite match the syntax > recognized by =91read=92. > > Ludo=92. > > > Thank you for the information. I'm using (+ arg 1) instead of (1+ arg) as a workaround. 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. --047d7bdc8328d1217604e65d82dc Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
On T= hu, Sep 12, 2013 at 6:04 PM, Ludovic Court=E8s <ludo@gnu.org> wro= te:
Brian Killian <brian.c.kill= ian@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?<= br>
I think it=92s an issue with =91write=92. =A0Specifically,
=91INITIAL_IDENTIFIER_MASK=92 in print.c doesn=92t quite match the syntax recognized by =91read=92.

Ludo=92.



Thank you for the i= nformation. I'm using (+ arg 1) instead of (1+ arg) as a workaround.
I'm using pretty-print to format code snippets as I work through S= ICP, which is becoming tedious. Do you know of a script or tool that format= s Scheme files using the pretty-print rules? I've switched from gedit t= o Emacs as an editor, but Emacs only seems to indent things properly, rathe= r than stripping extraneous newlines and trying to fit expressions on one l= ine if possible like pretty-print does.
--047d7bdc8328d1217604e65d82dc--