From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Truncated print Date: Sun, 03 Jan 2010 00:52:31 +0100 Message-ID: <87bphc9i9s.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1262476373 12762 80.91.229.12 (2 Jan 2010 23:52:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Jan 2010 23:52:53 +0000 (UTC) Cc: guile-devel@gnu.org To: "Andy Wingo" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Jan 03 00:52:46 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NRDm0-0000kJ-Q1 for guile-devel@m.gmane.org; Sun, 03 Jan 2010 00:52:45 +0100 Original-Received: from localhost ([127.0.0.1]:35658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRDm1-00029O-3f for guile-devel@m.gmane.org; Sat, 02 Jan 2010 18:52:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRDlx-00027c-S8 for guile-devel@gnu.org; Sat, 02 Jan 2010 18:52:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRDls-00023f-Oq for guile-devel@gnu.org; Sat, 02 Jan 2010 18:52:41 -0500 Original-Received: from [199.232.76.173] (port=42484 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRDls-00023b-Iv for guile-devel@gnu.org; Sat, 02 Jan 2010 18:52:36 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:35135) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NRDls-0003aB-7m for guile-devel@gnu.org; Sat, 02 Jan 2010 18:52:36 -0500 Original-Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRDlr-0006X7-HC for guile-devel@gnu.org; Sat, 02 Jan 2010 18:52:35 -0500 X-IronPort-AV: E=Sophos;i="4.47,490,1257116400"; d="scan'208";a="40637308" Original-Received: from reverse-83.fdn.fr (HELO nixey) ([80.67.176.83]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 03 Jan 2010 00:52:33 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 =?iso-8859-1?Q?Niv=F4se?= an 218 de la =?iso-8859-1?Q?R=E9volution?= 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 In-Reply-To: (Andy Wingo's message of "Tue, 29 Dec 2009 12:27:54 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9813 Archived-At: Howdy! "Andy Wingo" writes: > commit b8596c08ac2ef2201c1e8559ac5f4d62ebde3d91 > Author: Andy Wingo > Date: Tue Dec 29 13:26:41 2009 +0100 > > add ~@y truncated printing directive to format >=20=20=20=20=20 > * doc/ref/misc-modules.texi (Formatted Output): Add documentation for > the new ~@y format directive. > (Pretty Printing): Add documentation for truncated-write. >=20=20=20=20=20 > * module/ice-9/format.scm (format): Add ~@y, for doing a truncated > print. Also, allow both ~y variants to take a width parameter. Nice! Can you please add test cases, e.g., based on the examples added to the manual? > +(truncated-print "The quick brown fox" #:width 10) (newline) > +@print{} "The quick brown..." I think it=E2=80=99d be nice to default to =E2=80=98HORIZONTAL ELLIPSIS=E2= =80=99 (U+2026). Perhaps the ellipsis string could be a keyword parameter? Thanks, Ludo=E2=80=99.