emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CSV parsing and other issues (Re: LC_NUMERIC)


From: Filipp Gunbin
Subject: Re: CSV parsing and other issues (Re: LC_NUMERIC)
Date: Fri, 11 Jun 2021 21:52:57 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

On 11/06/2021 17:10 +0300, Eli Zaretskii wrote:

>> From: Filipp Gunbin <fgunbin@fastmail.fm>
>> Cc: Boruch Baum <boruch_baum@gmx.com>,  manikulin@gmail.com,
>>   emacs-devel@gnu.org
>> Date: Fri, 11 Jun 2021 16:56:34 +0300
>>
>> On 10/06/2021 22:23 +0300, Eli Zaretskii wrote:
>>
>> > I don't think it's TRT for Emacs to expose locale-dependent features
>> > that cannot be controlled from Lisp, sorry.  We need to find a better
>> > way.  For example, there could be a Lisp variable that specifies the
>> > group separator character, and then 'format' could use that character
>> > when the format spec includes %'.  Which means we'd need to implement
>> > that in our own code; patches welcome.
>>
>> Maybe an alternative set of specifiers, which output data in
>> locale-specific format.  Then a single variable to let-bound around
>> format, which instructs what locale to use.  Very simple...
>
> Sorry, I don't think I understand what you propose.  Please elaborate
> on the "alternative set of specifiers, which output data in
> locale-specific format".

I mean that for every specifier which could be affected by locale (but
isn't), there could be additional specifier, which takes locale into
account.  Less awkward, there could be an explicit modifier which says
"use locale for this specifier in format".  Something like `O' or `E'
modifier in "format-time-string".

This way only given format call is affected, without surprises somewhere
below in the call stack.

Then, a locale to use could be let-bound around this format call, thus
overriding the default which came from env vars or from somewhere else.

Filipp



reply via email to

[Prev in Thread] Current Thread [Next in Thread]