From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: executing org-table TBLFM form changes (resets) language settings Date: Thu, 25 Jan 2018 14:27:40 -0500 Message-ID: <87inbphh77.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eenCN-0000K5-1z for emacs-orgmode@gnu.org; Thu, 25 Jan 2018 14:28:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eenCI-0006uZ-IN for emacs-orgmode@gnu.org; Thu, 25 Jan 2018 14:28:35 -0500 Received: from [195.159.176.226] (port=57268 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eenCI-0006ty-Au for emacs-orgmode@gnu.org; Thu, 25 Jan 2018 14:28:30 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1een9j-0005Nu-N0 for emacs-orgmode@gnu.org; Thu, 25 Jan 2018 20:25:51 +0100 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 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. -- Nick