From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Hansen Subject: Re: Date format when exporting to LaTeX? Date: Mon, 01 Jul 2013 18:40:45 -0400 Message-ID: <51D2056D.8060704@bbn.com> References: <51D1EF34.5080806@bbn.com> <87a9m6j6ls.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utmm8-0006rC-On for emacs-orgmode@gnu.org; Mon, 01 Jul 2013 18:40:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utmm7-0002KL-IR for emacs-orgmode@gnu.org; Mon, 01 Jul 2013 18:40:48 -0400 Received: from smtp.bbn.com ([128.33.1.81]:32704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utmm7-0002KE-47 for emacs-orgmode@gnu.org; Mon, 01 Jul 2013 18:40:47 -0400 Received: from socket.bbn.com ([192.1.120.102]:39881) by smtp.bbn.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Utmm5-0000PO-TS for emacs-orgmode@gnu.org; Mon, 01 Jul 2013 18:40:46 -0400 In-Reply-To: <87a9m6j6ls.fsf@pank.eu> 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 On 2013-07-01 17:46, Rasmus wrote: > > Hi Richard, > >> I recently upgraded from 7.8.03 to current master (actually >> release_8.0.3-299-g1d606c0) and now when I export to LaTeX, the following: >> >> #+DATE: %Y-%m-%d >> >> no longer causes the date to be the current date in ISO 8601 format. It >> now simply prints "%Y-%m-%d". >> >> I tried: >> >> #+DATE: {{{date(%Y-%m-%d)}}} > > This also doesn't work for, but I've never used it before. But it > should be {{{time(.)}}} cf. > > http://orgmode.org/cgit.cgi/org-mode.git/commit/?h=maint I tried: #+DATE: {{{time(%Y-%m-%d)}}} and that did work. Thank you! Unfortunately this does not work quite right with org-mode 7.8.03, so I'll have to make sure everyone I collaborate with upgrades their org-mode. :( > >> but got "Circular macro expansion: date". I also tried: >> >> #+BIND: org-export-date-timestamp-format "%Y-%m-%d" > > This works for me in Org-mode version 8.0.3 > (release_8.0.3-309-gabacff). Is the problem still persistent after > trying from emacs -q or after trying M-x org-reload? > > > #+BIND: org-export-date-timestamp-format "%Y-%m-%d" > #+DATE: <2013-07-01 Mon> > > * test > > #+begin_src emacs-lisp > (setq org-export-date-timestamp-format "%B %e, %Y") > (set (make-local-variable 'org-export-allow-bind-keywords) t) > #+end_src This works for me too, but: * I must provide a date. If I don't have that #+DATE line then the LaTeX exporter uses \today, and that ignores org-export-date-timestamp-format. I don't want to have to specify a date; I want it to use today's date. (The {{{time()}}} macro works well for this, but I was unaware of its existence until now.) * org-export-allow-bind-keywords must be true. Adding it as a file-local variable is not an acceptable solution in my circumstance. I didn't have to set this variable when I was using 7.8.03 -- org-mode simply asked me (once) if it was OK to bind the variables. I miss that behavior. Thanks again for letting me know about {{{time(.)}}}. -Richard