From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Rainer Stengele Newsgroups: gmane.emacs.help Subject: Re: executing org-table TBLFM form changes (resets) language settings - seems a calc related issue Date: Fri, 9 Feb 2018 18:01:42 +0100 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1518196723 3097 195.159.176.226 (9 Feb 2018 17:18:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Feb 2018 17:18:43 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 09 18:18:39 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ekCJm-0000CD-NA for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Feb 2018 18:18:35 +0100 Original-Received: from localhost ([::1]:46340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekCLo-0004qt-2J for geh-help-gnu-emacs@m.gmane.org; Fri, 09 Feb 2018 12:20:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekC4P-0007Ky-RS for help-gnu-emacs@gnu.org; Fri, 09 Feb 2018 12:02:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekC4M-0004Dy-Mj for help-gnu-emacs@gnu.org; Fri, 09 Feb 2018 12:02:41 -0500 Original-Received: from [195.159.176.226] (port=60660 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ekC4M-0004Bu-FS for help-gnu-emacs@gnu.org; Fri, 09 Feb 2018 12:02:38 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ekC1z-0002dc-9p for help-gnu-emacs@gnu.org; Fri, 09 Feb 2018 18:00:11 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 67 Original-X-Complaints-To: usenet@blaine.gmane.org In-Reply-To: Content-Language: de-DE-1901 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115942 Archived-At: Am 01.02.2018 um 15:50 schrieb Rainer Stengele: > 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 > > > All again, any idea where and why calc is changing the localised weekday names? How could I debug into calc code from calling the TBLFM line in org-mode? Thank you. Regards, Rainer