From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: New exporter: no custom timestamps Date: Tue, 18 Sep 2012 13:15:32 +0200 Message-ID: <87r4pz4m5n.fsf@bzg.ath.cx> References: <1347889740.96406.YahooMailNeo@web29802.mail.ird.yahoo.com> <877grs32nl.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDvmG-0003Yt-Sv for emacs-orgmode@gnu.org; Tue, 18 Sep 2012 07:15:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDvmC-0004Rz-BO for emacs-orgmode@gnu.org; Tue, 18 Sep 2012 07:15:40 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:47633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDvmC-0004Qw-3A for emacs-orgmode@gnu.org; Tue, 18 Sep 2012 07:15:36 -0400 Received: by wgbds1 with SMTP id ds1so3243818wgb.0 for ; Tue, 18 Sep 2012 04:15:35 -0700 (PDT) In-Reply-To: <877grs32nl.fsf@gmail.com> (Jambunathan K.'s message of "Tue, 18 Sep 2012 00:19:50 +0530") 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: Jambunathan K Cc: Orgmode , "n.goaziou@gmail.com" --=-=-= Content-Type: text/plain Hi Jambunathan, Jambunathan K writes: > I am not sure whether (all) the exporters should be changed or just the > API needs to be fixed. I suggest to fix this in org-e-html.el with the attached patch. There is another option: to set :raw-value for time-stamps, but this feels a bit clumsy, especially when there is a :range-end. (org-element-property :raw-value TIMESTAMP) Let me know what you think. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=org-e-html.el.patch diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el index f3daa17..c3d1bf2 100644 --- a/contrib/lisp/org-e-html.el +++ b/contrib/lisp/org-e-html.el @@ -2857,11 +2857,12 @@ information." "Transcode a TIMESTAMP object from Org to HTML. CONTENTS is nil. INFO is a plist holding contextual information." - (let ((value (org-translate-time (org-element-property :value timestamp))) - (range-end (org-element-property :range-end timestamp))) + (let* ((f (if (eq (org-element-property :type timestamp) 'inactive) "[%s]" "<%s>")) + (value (org-translate-time (format f (org-element-property :value timestamp)))) + (range-end (org-element-property :range-end timestamp))) (format "%s" (if (not range-end) value - (concat value "–" (org-translate-time range-end)))))) + (concat value "–" (org-translate-time (format f range-end))))))) ;;;; Underline --=-=-= Content-Type: text/plain -- Bastien --=-=-=--