On 28/08/2021 14:07, Jarmo Hurri wrote:

I wonder if it is possible to get org table formulas to respect numeric
locale.

Even to add some functions to Emacs that respect numeric locales, it is necessary to use e.g. dynamic modules (warning: do not try to change global locale by setlocale(3), almost certainly something in Emacs will be broken, a library that allows local locale objects is strongly preferred).
https://www.gnu.org/software/emacs/manual/html_node/elisp/Writing-Dynamic-Modules.html

Emacs documentation says that Emacs uses the value of LC_NUMERIC:

https://www.gnu.org/software/emacs/manual/html_node/emacs/General-Variables.html

It is a confusing statement, see:
- https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29645
  #29645 Feature Request: Locale aware formatting
  Date: Sun, 10 Dec 2017 15:05:02 UTC
- https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00327.html
  https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00139.html

The state of numeric locales in Emacs is a little worse than just unsupported. Mostly "C" is forced for LC_NUMERIC, so e.g. grouping is not used. However if your locale uses comma "," as decimal separator,
you may be confused by calc results:

    M-x calc RET dg RET 123456
    123,456


Reply via email to