Browse Source

Export back-ends: Fix planning and clock export

* 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.
Nicolas Goaziou 5 years ago
parent
commit
c60ef1d9d9

+ 16 - 8
contrib/lisp/org-e-ascii.el

@@ -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)))))))
    " "))
 
 

+ 10 - 5
contrib/lisp/org-e-groff.el

@@ -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))))))))
     "")
    ""))
 

+ 10 - 5
contrib/lisp/org-e-html.el

@@ -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)))))))
       " "))))
 
 

+ 10 - 5
contrib/lisp/org-e-latex.el

@@ -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))))))))
     " ")
    "\\\\"))
 

+ 15 - 7
contrib/lisp/org-e-odt.el

@@ -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

+ 11 - 6
contrib/lisp/org-e-texinfo.el

@@ -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))))))))
     " ")
    "@*"))