help-gnu-emacs
[Top][All Lists]
Advanced

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

executing org-table TBLFM form changes (resets) language settings - seem


From: Rainer Stengele
Subject: executing org-table TBLFM form changes (resets) language settings - seems a calc related issue
Date: Thu, 1 Feb 2018 15:50:04 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

Am 25.01.2018 um 14:30 schrieb Rainer Stengele:
All,

My current-language-environment is "German".
Having an Org table with a TBLFM attached:

| IM Startzeit          | IM Endezeit           | Stunden | delta(x,16) | Anm. |
|-----------------------+-----------------------+---------+-------------+------|
| [2018-01-22 Mo 19:30] | [2018-01-23 Di 14:30] |   19.00 |        3.00 |      |
|                       |                       |         |             |      |
#+TBLFM: $3=24*(date(<$2>)-date(<$1>)); %.2f::$4=$3-16.0; %.2f

entering a new timestamp correctly inserts German dayname abbrevs: ("Do", German for 
"Thu", English):

| IM Startzeit          | IM Endezeit           | Stunden | delta(x,16) | Anm. |
|-----------------------+-----------------------+---------+-------------+------|
| [2018-01-22 Mo 19:30] | [2018-01-23 Di 14:30] |   19.00 |        3.00 |      |
| [2018-01-25 Do 14:19] |                       |         |             |      |
#+TBLFM: $3=24*(date(<$2>)-date(<$1>)); %.2f::$4=$3-16.0; %.2f

Executing the TBLFM line with C-c C-c changes (resets) the language environment 
to English.

Now inserting a timestamp inserts "Thu" instead of "Do", that is it uses the 
English day name abbrevs:

| IM Startzeit          | IM Endezeit           |      Stunden |  delta(x,16) | 
Anm. |
|-----------------------+-----------------------+--------------+--------------+------|
| [2018-01-22 Mo 19:30] | [2018-01-23 Di 14:30] |        19.00 |         3.00 | 
     |
| [2018-01-25 Thu 14:21]|                       |              |              | 
     |
#+TBLFM: $3=24*(date(<$2>)-date(<$1>)); %.2f::$4=$3-16.0; %.2f

Believe me it took me some time to find out what action in Emacs changes the 
whole lang environment.

Is that a bug or is there a language setting in the TBLFM form?

Thanks for any hint.

Regards,
Rainer

Hi,

I have asked the g.e.orgmode newsgroup to try to help me with the issue 
described above
Unfortunately this seems to be a calc related item and I kindly ask a calc 
expert to try to help out.

Summarising as far as I understand: The "calc-date" function does seem to 
change the language settings.
After some advice I tried to set the following variables manually but that even ended in #ERROR entries in my table after calculating the TBLFMT line:

(setq math-long-weekday-names '( "Sonntag" "Montag" "Dienstag" "Mittwoch" "Donnerstag" 
"Freitag" "Samstag" ))
(setq math-short-weekday-names '( "Son" "Mon" "Die" "Mit" "Don" "Fre" "Sam" ))


Any help is appreciated.

Thank you.
Regards, Rainer




reply via email to

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