From: Gdobbins <gdobbins@protonmail.com>
To: emacs-devel@gnu.org
Subject: Re: RFC: locale-sensitive Emacs functions
Date: Tue, 28 Mar 2017 00:10:50 -0400 [thread overview]
Message-ID: <8Sj4h1O1rGU3p2OhVtn_8rleNKxYpeaUgnELj6kkM2iv3vXZWKaY0viThS1GwHfnf3EhDqooeJbfbOvbk-YBLpVI4znjtvf9Ot3G4ej8YJM=@protonmail.com> (raw)
In-Reply-To: <87lgrq5ccp.fsf@lifelogs.com>
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
In Common Lisp, such directives use : rather than ', but more importantly they also take arguments to specify the grouping and the separation character. They default to 3 and comma respectively. If Emacs' format were to allow similar arguments to be provided, it would allow the exact format to be specified where it is important and the user could set global variables like default-digit-grouping and default-digit-separator or some such to get behavior matching their locale. For example:
(format "%:d" 100000) => "100,000"
(let ((default-digit-grouping 4)
(default-digit-separator ?.))
(format "%:d" 100000)) => "10.0000"
-- Graham Dobbins
[-- Attachment #2: Type: text/html, Size: 907 bytes --]
next prev parent reply other threads:[~2017-03-28 4:10 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 [this message]
2017-03-28 4:37 ` Paul Eggert
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='8Sj4h1O1rGU3p2OhVtn_8rleNKxYpeaUgnELj6kkM2iv3vXZWKaY0viThS1GwHfnf3EhDqooeJbfbOvbk-YBLpVI4znjtvf9Ot3G4ej8YJM=@protonmail.com' \
--to=gdobbins@protonmail.com \
--cc=emacs-devel@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.
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.