Export back-ends: Fix planning and clock export
authorNicolas Goaziou <n.goaziou@gmail.com>
Tue, 30 Oct 2012 20:59:50 +0000 (21:59 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Tue, 30 Oct 2012 20:59:50 +0000 (21:59 +0100)
* contrib/lisp/org-e-ascii.el (org-e-ascii-clock,
  org-e-ascii-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-groff.el (org-e-groff-clock,
  org-e-groff-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-html.el (org-e-html-clock, org-e-html-planning):
  Fix export due to recent timestamps changes.
* contrib/lisp/org-e-latex.el (org-e-latex-clock,
  org-e-latex-planning): Fix export due to recent timestamps changes.
* contrib/lisp/org-e-odt.el (org-e-odt-clock, org-e-odt-planning): Fix
  export due to recent timestamps changes.
* contrib/lisp/org-e-texinfo.el (org-e-texinfo-clock,
  org-e-texinfo-planning): Fix export due to recent timestamps
  changes.

contrib/lisp/org-e-ascii.el
contrib/lisp/org-e-groff.el
contrib/lisp/org-e-html.el
contrib/lisp/org-e-latex.el
contrib/lisp/org-e-odt.el
contrib/lisp/org-e-texinfo.el

index 819a0c3..b352674 100644 (file)
@@ -982,8 +982,10 @@ holding contextual information."
 CONTENTS is nil.  INFO is a plist holding contextual
 information."
   (concat org-clock-string " "
-         (org-translate-time (org-element-property :value clock))
-         (let ((time (org-element-property :time clock)))
+         (org-translate-time
+          (org-element-property :raw-value
+                                (org-element-property :value clock)))
+         (let ((time (org-element-property :duration clock)))
            (and time
                 (concat " => "
                         (apply 'format
@@ -1431,14 +1433,20 @@ channel."
    'identity
    (delq nil
         (list (let ((closed (org-element-property :closed planning)))
-                (when closed (concat org-closed-string " "
-                                     (org-translate-time closed))))
+                (when closed
+                  (concat org-closed-string " "
+                          (org-translate-time
+                           (org-element-property :raw-value closed)))))
               (let ((deadline (org-element-property :deadline planning)))
-                (when deadline (concat org-deadline-string " "
-                                       (org-translate-time deadline))))
+                (when deadline
+                  (concat org-deadline-string " "
+                          (org-translate-time
+                           (org-element-property :raw-value deadline)))))
               (let ((scheduled (org-element-property :scheduled planning)))
-                (when scheduled (concat org-scheduled-string " "
-                                        (org-translate-time scheduled))))))
+                (when scheduled
+                  (concat org-scheduled-string " "
+                          (org-translate-time
+                           (org-element-property :raw-value scheduled)))))))
    " "))
 
 
index 7fe9eb7..94f0cf9 100644 (file)
@@ -830,8 +830,10 @@ information."
   (concat
    (format "\\fB%s\\fP " org-clock-string)
    (format org-e-groff-inactive-timestamp-format
-           (concat (org-translate-time (org-element-property :value clock))
-                   (let ((time (org-element-property :time clock)))
+           (concat (org-translate-time
+                   (org-element-property :raw-value
+                                         (org-element-property :value clock)))
+                   (let ((time (org-element-property :duration clock)))
                      (and time (format " (%s)" time)))))))
 
 ;;; Code
@@ -1439,19 +1441,22 @@ information."
                (concat
                 (format "\\fR %s \\fP" org-closed-string)
                 (format org-e-groff-inactive-timestamp-format
-                        (org-translate-time closed)))))
+                        (org-translate-time
+                        (org-element-property :raw-value closed))))))
            (let ((deadline (org-element-property :deadline planning)))
              (when deadline
                (concat
                 (format "\\fB %s \\fP" org-deadline-string)
                 (format org-e-groff-active-timestamp-format
-                        (org-translate-time deadline)))))
+                        (org-translate-time
+                        (org-element-property :raw-value deadline))))))
            (let ((scheduled (org-element-property :scheduled planning)))
              (when scheduled
                (concat
                 (format "\\fR %s \\fP" org-scheduled-string)
                 (format org-e-groff-active-timestamp-format
-                        (org-translate-time scheduled)))))))
+                        (org-translate-time
+                        (org-element-property :raw-value scheduled))))))))
     "")
    ""))
 
index 0f3ed7d..9afe4a8 100644 (file)
@@ -1591,8 +1591,10 @@ channel."
 </span>
 </p>"
          org-clock-string
-         (org-translate-time (org-element-property :value clock))
-         (let ((time (org-element-property :time clock)))
+         (org-translate-time
+          (org-element-property :raw-value
+                                (org-element-property :value clock)))
+         (let ((time (org-element-property :duration clock)))
            (and time (format " <span class=\"timestamp\">(%s)</span>" time)))))
 
 
@@ -2391,15 +2393,18 @@ channel."
             (let ((closed (org-element-property :closed planning)))
               (when closed
                 (format span-fmt org-closed-string
-                        (org-translate-time closed))))
+                        (org-translate-time
+                         (org-element-property :raw-value closed)))))
             (let ((deadline (org-element-property :deadline planning)))
               (when deadline
                 (format span-fmt org-deadline-string
-                        (org-translate-time deadline))))
+                        (org-translate-time
+                         (org-element-property :raw-value deadline)))))
             (let ((scheduled (org-element-property :scheduled planning)))
               (when scheduled
                 (format span-fmt org-scheduled-string
-                        (org-translate-time scheduled))))))
+                        (org-translate-time
+                         (org-element-property :raw-value scheduled)))))))
       " "))))
 
 
index fdb9e31..61f66fa 100644 (file)
@@ -1104,8 +1104,10 @@ information."
    "\\noindent"
    (format "\\textbf{%s} " org-clock-string)
    (format org-e-latex-inactive-timestamp-format
-          (concat (org-translate-time (org-element-property :value clock))
-                  (let ((time (org-element-property :time clock)))
+          (concat (org-translate-time
+                   (org-element-property :raw-value
+                                         (org-element-property :value clock)))
+                  (let ((time (org-element-property :duration clock)))
                     (and time (format " (%s)" time)))))
    "\\\\"))
 
@@ -1916,19 +1918,22 @@ information."
               (concat
                (format "\\textbf{%s} " org-closed-string)
                (format org-e-latex-inactive-timestamp-format
-                       (org-translate-time closed)))))
+                       (org-translate-time
+                        (org-element-property :raw-value closed))))))
           (let ((deadline (org-element-property :deadline planning)))
             (when deadline
               (concat
                (format "\\textbf{%s} " org-deadline-string)
                (format org-e-latex-active-timestamp-format
-                       (org-translate-time deadline)))))
+                       (org-translate-time
+                        (org-element-property :raw-value deadline))))))
           (let ((scheduled (org-element-property :scheduled planning)))
             (when scheduled
               (concat
                (format "\\textbf{%s} " org-scheduled-string)
                (format org-e-latex-active-timestamp-format
-                       (org-translate-time scheduled)))))))
+                       (org-translate-time
+                        (org-element-property :raw-value scheduled))))))))
     " ")
    "\\\\"))
 
index 3478cc5..2a1d9cb 100644 (file)
@@ -1384,10 +1384,12 @@ channel."
                   "OrgTimestampKeyword" org-clock-string)
           (format "<text:span text:style-name=\"%s\">%s</text:span>"
                   "OrgTimestamp"
-                  (concat (org-translate-time
-                           (org-element-property :value clock))
-                          (let ((time (org-element-property :time clock)))
-                            (and time (format " (%s)" time))))))))
+                  (concat
+                   (org-translate-time
+                    (org-element-property :raw-value
+                                          (org-element-property :value clock)))
+                   (let ((time (org-element-property :duration clock)))
+                     (and time (format " (%s)" time))))))))
 
 
 ;;;; Code
@@ -2609,21 +2611,27 @@ channel."
                (format "<text:span text:style-name=\"%s\">%s</text:span>"
                        "OrgTimestampKeyword" org-closed-string)
                (format "<text:span text:style-name=\"%s\">%s</text:span>"
-                       "OrgTimestamp" (org-translate-time closed)))))
+                       "OrgTimestamp"
+                       (org-translate-time
+                        (org-element-property :raw-value closed))))))
           (let ((deadline (org-element-property :deadline planning)))
             (when deadline
               (concat
                (format "<text:span text:style-name=\"%s\">%s</text:span>"
                        "OrgTimestampKeyword" org-deadline-string)
                (format "<text:span text:style-name=\"%s\">%s</text:span>"
-                       "OrgTimestamp" (org-translate-time deadline)))))
+                       "OrgTimestamp"
+                       (org-translate-time
+                        (org-element-property :raw-value deadline))))))
           (let ((scheduled (org-element-property :scheduled planning)))
             (when scheduled
               (concat
                (format "<text:span text:style-name=\"%s\">%s</text:span>"
                        "OrgTimestampKeyword" org-scheduled-string)
                (format "<text:span text:style-name=\"%s\">%s</text:span>"
-                       "OrgTimestamp" (org-translate-time scheduled))))))))
+                       "OrgTimestamp"
+                       (org-translate-time
+                        (org-element-property :raw-value scheduled)))))))))
 
 
 ;;;; Property Drawer
index 79fa2ed..6eb536e 100644 (file)
@@ -769,8 +769,10 @@ information."
    "@noindent"
    (format "@strong{%s} " org-clock-string)
    (format org-e-texinfo-inactive-timestamp-format
-          (concat (org-translate-time (org-element-property :value clock))
-                  (let ((time (org-element-property :time clock)))
+          (concat (org-translate-time
+                   (org-element-property :raw-value
+                                         (org-element-property :value clock)))
+                  (let ((time (org-element-property :duration clock)))
                     (and time (format " (%s)" time)))))
    "@*"))
 
@@ -1308,21 +1310,24 @@ information."
           (let ((closed (org-element-property :closed planning)))
             (when closed
               (concat
-               (format "@strong%s} " org-closed-string)
+               (format "@strong{%s} " org-closed-string)
                (format org-e-texinfo-inactive-timestamp-format
-                       (org-translate-time closed)))))
+                       (org-translate-time
+                        (org-element-property :raw-value closed))))))
           (let ((deadline (org-element-property :deadline planning)))
             (when deadline
               (concat
                (format "@strong{%s} " org-deadline-string)
                (format org-e-texinfo-active-timestamp-format
-                       (org-translate-time deadline)))))
+                       (org-translate-time
+                        (org-element-property :raw-value deadline))))))
           (let ((scheduled (org-element-property :scheduled planning)))
             (when scheduled
               (concat
                (format "@strong{%s} " org-scheduled-string)
                (format org-e-texinfo-active-timestamp-format
-                       (org-translate-time scheduled)))))))
+                       (org-translate-time
+                        (org-element-property :raw-value scheduled))))))))
     " ")
    "@*"))