From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: Truncated print
Date: Sun, 03 Jan 2010 13:22:10 +0100 [thread overview]
Message-ID: <m3vdfjz8ct.fsf@pobox.com> (raw)
In-Reply-To: <87bphc9i9s.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sun, 03 Jan 2010 00:52:31 +0100")
Hello :)
On Sun 03 Jan 2010 00:52, ludo@gnu.org (Ludovic Courtès) writes:
>> commit b8596c08ac2ef2201c1e8559ac5f4d62ebde3d91
>> Author: Andy Wingo <wingo@pobox.com>
>> Date: Tue Dec 29 13:26:41 2009 +0100
>>
>> add ~@y truncated printing directive to format
>
> Nice! Can you please add test cases, e.g., based on the examples added
> to the manual?
Sure, will do.
>> +(truncated-print "The quick brown fox" #:width 10) (newline)
>> +@print{} "The quick brown..."
>
> I think it’d be nice to default to ‘HORIZONTAL ELLIPSIS’ (U+2026).
> Perhaps the ellipsis string could be a keyword parameter?
Having it be a keyword parameter would complicate things somewhat, as
there are some hardcoded lengths in there. It could work.
But perhaps a bigger problem is that if you're in a non-unicode
locale -- *as Guile is by default, without a call to setlocale* -- the
`…' will expand to `...', which uses up more characters, thus the
"truncated" part of things doesn't work as advertised.
So either we play games with locale conversion (OK, but complicated), or
we setlocale() at the beginning and punt on the issue. See
http://lists.gnu.org/archive/html/guile-devel/2009-12/msg00025.html.
Given Mike's mail, I think we should be calling setlocale(). What do you
think?
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2010-01-03 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1NPbB4-00045m-3S@cvs.savannah.gnu.org>
2010-01-02 23:52 ` Truncated print Ludovic Courtès
2010-01-03 12:22 ` Andy Wingo [this message]
2010-01-05 0:28 ` Ludovic Courtès
2010-01-05 9:01 ` Andy Wingo
2010-01-08 20:55 ` Ludovic Courtès
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=m3vdfjz8ct.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@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).