From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: [new exporter] adhere org-export-date-timestamp-format? Date: Sun, 18 Nov 2012 15:43:41 +0100 Message-ID: <877gpj3raa.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ta66L-0002eV-Tr for emacs-orgmode@gnu.org; Sun, 18 Nov 2012 09:44:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ta66I-0007Lp-Qa for emacs-orgmode@gnu.org; Sun, 18 Nov 2012 09:44:01 -0500 Received: from plane.gmane.org ([80.91.229.3]:60866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ta66I-0007Ld-Jf for emacs-orgmode@gnu.org; Sun, 18 Nov 2012 09:43:58 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ta66O-0003Ft-Fg for emacs-orgmode@gnu.org; Sun, 18 Nov 2012 15:44:04 +0100 Received: from 192.167.90.131 ([192.167.90.131]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 Nov 2012 15:44:04 +0100 Received: from rasmus by 192.167.90.131 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 Nov 2012 15:44:04 +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, 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!