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: executing org-table TBLFM form changes (resets) language settings - seems a calc related issue Date: Thu, 1 Feb 2018 15:50:04 +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 1517496618 30542 195.159.176.226 (1 Feb 2018 14:50:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Feb 2018 14:50:18 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 01 15:50:14 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 1ehGBl-0007IX-BO for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Feb 2018 15:50:09 +0100 Original-Received: from localhost ([::1]:41033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehGDm-00081I-7a for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Feb 2018 09:52:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehGCe-0007yR-HH for help-gnu-emacs@gnu.org; Thu, 01 Feb 2018 09:51:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehGCY-00074s-Em for help-gnu-emacs@gnu.org; Thu, 01 Feb 2018 09:51:04 -0500 Original-Received: from [195.159.176.226] (port=33955 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ehGCX-00073c-Pa for help-gnu-emacs@gnu.org; Thu, 01 Feb 2018 09:50:58 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ehG9u-0000bQ-54 for help-gnu-emacs@gnu.org; Thu, 01 Feb 2018 15:48:14 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 56 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:115892 Archived-At: 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