emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: [new exporter] adhere org-export-date-timestamp-format?
Date: Sun, 18 Nov 2012 15:43:41 +0100	[thread overview]
Message-ID: <877gpj3raa.fsf@pank.eu> (raw)

Hi,

Would it be desirable if the new exporter took the variable
org-export-date-timestamp-format into consideration when formatting
dates?  Or is there another way of dealing with the formatting of
dates?

┏━━━┫  org-export-date-timestamp-format ~"%Y-%m-%d"~ ┃
┃     Type: string
┃     Since: Emacs version 24.1
┃     In file: org-exp.el 
┃     Time string format for Org timestamps in the #+DATE option.
┗━━━

Here's the relevant snip for org-exp. 

 ((string-equal key "DATE")
  ;; If date is an Org timestamp, convert it to a time
  ;; string using `org-export-date-timestamp-format'
  (when (string-match org-ts-regexp3 val)
    (setq val (format-time-string
               org-export-date-timestamp-format
               (apply 'encode-time (org-parse-time-string
                                    (match-string 0 val))))))
  (setq p (plist-put p :date val)))

Example:

#+BEGIN_SRC org
#+DATE: <2012-11-18 Sun>
* test
#+END_SRC

Date is exported as \date{<2012-11-18 Sun>} with the new exporter and
\date{2012-11-18} with the old exporter (using emacs -q).

Thanks,
Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!

             reply	other threads:[~2012-11-18 14:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-18 14:43 Rasmus [this message]
2012-12-24  1:50 ` [new exporter] adhere org-export-date-timestamp-format? Bastien
2013-01-06 10:00   ` Nicolas Goaziou
2013-01-06 11:45     ` Bastien
2013-01-09 15:29       ` Nicolas Goaziou
2013-01-09 17:15         ` Bastien
2013-01-09 18:03           ` Nicolas Goaziou
2013-01-09 18:30             ` Bastien
2013-01-12 11:30               ` Nicolas Goaziou
2013-01-12 14:45                 ` Bastien
2013-01-30 21:53                   ` Nicolas Goaziou
2013-01-30 23:54                     ` Rasmus

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=877gpj3raa.fsf@pank.eu \
    --to=rasmus@gmx.us \
    --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).