emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Hansen <rhansen@bbn.com>
To: emacs-orgmode@gnu.org
Subject: Re: Date format when exporting to LaTeX?
Date: Mon, 01 Jul 2013 18:40:45 -0400	[thread overview]
Message-ID: <51D2056D.8060704@bbn.com> (raw)
In-Reply-To: <87a9m6j6ls.fsf@pank.eu>

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

  reply	other threads:[~2013-07-01 22:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01 21:05 Date format when exporting to LaTeX? Richard Hansen
2013-07-01 21:46 ` Rasmus
2013-07-01 22:40   ` Richard Hansen [this message]
2013-07-02 15:48     ` Nicolas Goaziou
2013-07-03  8:14       ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51D2056D.8060704@bbn.com \
    --to=rhansen@bbn.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).