From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: executing org-table TBLFM form changes (resets) language settings Date: Tue, 30 Jan 2018 20:45:43 +0100 Message-ID: References: <87inbphh77.fsf@alphaville.usersys.redhat.com> <59222bd6-d62a-23a4-544b-66466bdc3380@online.de> <45d4aef9-5e98-6153-0316-eaec502f5530@online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egbrO-0003NR-Uk for emacs-orgmode@gnu.org; Tue, 30 Jan 2018 14:47:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egbqm-0001GH-8w for emacs-orgmode@gnu.org; Tue, 30 Jan 2018 14:46:26 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:63989) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1egbql-0001Bq-NX for emacs-orgmode@gnu.org; Tue, 30 Jan 2018 14:45:48 -0500 Received: from [192.168.178.21] ([188.99.39.27]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MVtai-1eDz8q3qiO-00X4jz for ; Tue, 30 Jan 2018 20:45:45 +0100 In-Reply-To: <45d4aef9-5e98-6153-0316-eaec502f5530@online.de> Content-Language: de-DE-1901 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Am 29.01.2018 um 08:49 schrieb Rainer Stengele: > Am 26.01.2018 um 10:46 schrieb Rainer Stengele: >> Am 25.01.2018 um 20:27 schrieb Nick Dokos: >>> Rainer Stengele writes: >>> >>>> 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 >>>> >>> >>> I can reproduce this if I start emacs like this: >>> >>>     emacs -q -l ~/src/minimal/min.org.el /tmp/dates.org & >>> >>> set the language environment inside emacs and then do C-c C-c on the >>> TBLFM line >>> and try to add another date. >>> >>> I cannot reproduce it when invoking emacs like this: >>> >>>     LANG=de_DE.UTF-8 emacs -q -l ~/src/minimal/min.org.el /tmp/dates.org >>> >>> so it seems you are right that in the first case, something changes >>> the language >>> environment. >>> >> Hi Nick, >> >> thanks for confirming. >> I am running under Windows and cannot apply your environment setting >> like this. >> >> Does anyboday have a chance to correct the misbehaviour in the TBLFM >> table code that changes the language settings? >> I will not be able to do it on my own. >> >> Thank you. >> Regards, Rainer >> >> > > Hi again, > > I found out that it is the "date" function that changes the language > settings. TBLFM lines without date calc don't change the behaviour. > May I please ask a calc expert to look into that function and > investigate the unwanted behaviour. > I am also not sure how to easily reset the language setting manually to > the correct one. > Can someone give me a hint please. > > Thank you. > Regards, Rainer > > > Hi again, has anybody an idea? Each time I calculate a time diff in an Org table I trigger the wrong creation of any org timestamp as the date language has changed. Full restart of Emacs needed right now :(. Regards, Rainer