From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: [new exporter] latex-date-timestamp-format not adhering #+LANGUAGE Date: Wed, 06 Mar 2013 15:02:01 +0100 Message-ID: <87lia0fwyu.fsf@med.uni-goettingen.de> References: <87lia22fd6.fsf@med.uni-goettingen.de> <87mwugznnm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDEvL-000153-LT for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 09:02:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDEvG-00049Z-Gb for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 09:02:27 -0500 Received: from plane.gmane.org ([80.91.229.3]:57721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDEvG-00049E-A1 for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 09:02:22 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UDEvY-0002yC-Dv for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 15:02:40 +0100 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Mar 2013 15:02:40 +0100 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Mar 2013 15:02:40 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Nicolas, thanks for taking this up! Nicolas Goaziou writes: > Hello, > > Andreas Leha writes: > >> I'd very much like to see org-latex-timestamp-format adhere to a >> possibly present #+LANGUAGE setting. > > There is no such variable as `org-latex-timestamp-format'. > Of course I meant 'org-latex-date-timestamp-format'. >> If I set org-latex-timestamp-format to "%A, %Y-%m-%d" the following org >> file produces >> "Donnerstag, 2013-03-07" on my system, where I'd prefer >> "Thursday, 2013-03-07". >> >> #+begin_src org >> #+TITLE: Some Document >> #+DATE: <2013-03-07 Do> >> #+LANGUAGE: en >> >> >> * Some test document >> With some content >> #+end_src >> >> Would such a change be possible? > > It is difficult. > > "%A" depends on a locale built within glibc. Assuming we know the locale > associated to the language string, it may or may not be available in > glibc. Also, `format-time-string' is a primitive, so even if local is > available, you cannot change it locally easily. I understand. > > A proper implementation would, IMO, not rely directly on > `format-time-string'. There could be a `org-format-time-string' > accepting the same arguments as `format-time-string' but replacing > locale related placeholders beforehand, according to a dictionary. > That sound quite tedious and boring work... And while I still think, that setting the #+LANGUAGE in org should ideally be reflected in the export -- also for the date formatting -- I found a solution to my problem that I use now: It does not use orgmode's date and date-formatting facilities, but moves the work to LaTeX. Thus, the bad side is that it is backend specific. #+begin_src org #+TITLE: Some Document #+DATE: \printdate{2013-03-07} #+LANGUAGE: en #+LaTeX_HEADER: \usepackage[english]{isodate} * Some test document With some content #+end_src vs. #+begin_src org #+TITLE: Some Document #+DATE: \printdate{2013-03-07} #+LANGUAGE: en #+LaTeX_HEADER: \usepackage[german]{isodate} * Some test document With some content #+end_src Regards, Andreas