From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: pretty-print for 1+ Date: Tue, 17 Sep 2013 12:02:15 +0200 Message-ID: <87fvt3hil4.fsf@gnu.org> References: <87li313de7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1379430586 9313 80.91.229.3 (17 Sep 2013 15:09:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Sep 2013 15:09:46 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Sep 17 17:09:49 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 1VLwuS-00074E-Lf for guile-user@m.gmane.org; Tue, 17 Sep 2013 17:09:48 +0200 Original-Received: from localhost ([::1]:41782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLwuS-0008Vm-1h for guile-user@m.gmane.org; Tue, 17 Sep 2013 11:09:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLs78-0001iw-5S for guile-user@gnu.org; Tue, 17 Sep 2013 06:02:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLs71-0001w5-05 for guile-user@gnu.org; Tue, 17 Sep 2013 06:02:34 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLs70-0001vr-PH for guile-user@gnu.org; Tue, 17 Sep 2013 06:02:26 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VLs6z-0005se-GE for guile-user@gnu.org; Tue, 17 Sep 2013 12:02:25 +0200 Original-Received: from 193.50.110.127 ([193.50.110.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Sep 2013 12:02:25 +0200 Original-Received: from ludo by 193.50.110.127 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Sep 2013 12:02:25 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.50.110.127 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Jour de la Vertu de =?utf-8?Q?l'Ann=C3=A9e?= 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:qtNpY6T+rTh2jAeKhjC7JFZ0KI8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-Mailman-Approved-At: Tue, 17 Sep 2013 11:09:30 -0400 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:10804 Archived-At: Brian Killian skribis: > On Thu, Sep 12, 2013 at 6:04 PM, Ludovic Courtès 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’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’.