From: Paul Eggert <eggert@cs.ucla.edu>
To: Gdobbins <gdobbins@protonmail.com>, emacs-devel@gnu.org
Subject: Re: RFC: locale-sensitive Emacs functions
Date: Mon, 27 Mar 2017 21:37:56 -0700 [thread overview]
Message-ID: <721338e4-fad3-e33c-2a77-59107fbe1ff2@cs.ucla.edu> (raw)
In-Reply-To: <8Sj4h1O1rGU3p2OhVtn_8rleNKxYpeaUgnELj6kkM2iv3vXZWKaY0viThS1GwHfnf3EhDqooeJbfbOvbk-YBLpVI4znjtvf9Ot3G4ej8YJM=@protonmail.com>
Gdobbins wrote:
> In Common Lisp, such directives use : rather than ', but more importantly they also take arguments to specify the grouping and the separation character.
The ' flag is the only printf flag that the POSIX printf function supports but
the Emacs 'format' function does not. When I looked into this a while ago I
remember concluding that I was glad I didn't have to write code to support the '
flag, as it would require messing with the LC_NUMERIC locale setting (currently
hardwired to "C" for other good reasons) and would make for some work redoing
carefully-calculated output buffer sizes internal to 'format', not to mention
the character set conversion that would be required.
For what it's worth, the Common Lisp approach cannot handle the Indian numbering
system, which has a comma every two digits except that the last grouping
contains three digits (e.g., "12,34,56,789"). This is something that POSIX can do.
next prev parent reply other threads:[~2017-03-28 4:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 3:06 RFC: locale-sensitive Emacs functions Ted Zlatanov
2017-03-28 4:10 ` Gdobbins
2017-03-28 4:37 ` Paul Eggert [this message]
2017-03-28 11:59 ` Gdobbins
2017-03-28 12:45 ` Ted Zlatanov
2017-03-30 18:27 ` Ted Zlatanov
2017-03-31 4:27 ` Gdobbins
2017-03-31 17:59 ` Davis Herring
2017-03-28 19:37 ` Paul Eggert
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=721338e4-fad3-e33c-2a77-59107fbe1ff2@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=gdobbins@protonmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.