summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-11-23 17:43:05 (GMT)
committer Nicolas Goaziou <n.goaziou@gmail.com>2012-11-23 17:43:05 (GMT)
commitf71df7dc508020b60697c1c31144f31fc27ce4f2 (patch)
tree092fdee4652a2e3de25288e48b06d5132fc1faab
parent0a142efddebd24e947c3d8666a73360f0f27249d (diff)
downloadorg-mode-f71df7dc508020b60697c1c31144f31fc27ce4f2.zip
org-mode-f71df7dc508020b60697c1c31144f31fc27ce4f2.tar.gz
export back-ends: Use new tools for timestamps
* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Use new tool. * contrib/lisp/org-e-groff.el (org-e-groff-timestamp): Use new tool. * contrib/lisp/org-e-html.el (org-e-html-timestamp): Use new tool. * contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Use new tool. * contrib/lisp/org-e-texinfo.el (org-e-texinfo-timestamp): Use new tool.
-rw-r--r--contrib/lisp/org-e-ascii.el39
-rw-r--r--contrib/lisp/org-e-groff.el4
-rw-r--r--contrib/lisp/org-e-html.el4
-rw-r--r--contrib/lisp/org-e-latex.el21
-rw-r--r--contrib/lisp/org-e-texinfo.el4
5 files changed, 16 insertions, 56 deletions
diff --git a/contrib/lisp/org-e-ascii.el b/contrib/lisp/org-e-ascii.el
index 1d9619f..508659c 100644
--- a/contrib/lisp/org-e-ascii.el
+++ b/contrib/lisp/org-e-ascii.el
@@ -952,11 +952,6 @@ INFO is a plist used as a communication channel."
;;; Transcode Functions
-;;;; Babel Call
-
-;; Babel Calls are ignored.
-
-
;;;; Bold
(defun org-e-ascii-bold (bold contents info)
@@ -1003,16 +998,6 @@ information."
(format org-e-ascii-verbatim-format (org-element-property :value code)))
-;;;; Comment
-
-;; Comments are ignored.
-
-
-;;;; Comment Block
-
-;; Comment Blocks are ignored.
-
-
;;;; Drawer
(defun org-e-ascii-drawer (drawer contents info)
@@ -1164,11 +1149,6 @@ information."
text-width 'center)))
-;;;; Inline Babel Call
-
-;; Inline Babel Calls are ignored.
-
-
;;;; Inline Src Block
(defun org-e-ascii-inline-src-block (inline-src-block contents info)
@@ -1231,6 +1211,7 @@ holding contextual information."
org-e-ascii-inner-margin)
(org-e-ascii--current-text-width inlinetask info)))))))
+
;;;; Italic
(defun org-e-ascii-italic (italic contents info)
@@ -1451,11 +1432,6 @@ channel."
" "))
-;;;; Property Drawer
-;;
-;; Property drawers are ignored.
-
-
;;;; Quote Block
(defun org-e-ascii-quote-block (quote-block contents info)
@@ -1496,6 +1472,7 @@ CONTENTS is the contents of the target. INFO is a plist holding
contextual information."
contents)
+
;;;; Section
(defun org-e-ascii-section (section contents info)
@@ -1541,6 +1518,7 @@ contextual information."
(when (and caption (not org-e-ascii-caption-above))
(concat "\n" caption)))))
+
;;;; Statistics Cookie
(defun org-e-ascii-statistics-cookie (statistics-cookie contents info)
@@ -1723,20 +1701,12 @@ a communication channel."
(funcall build-hline "+" "-" "+" "+")))))))
-;;;; Target
-
-;; Targets are invisible.
-
-
;;;; Timestamp
(defun org-e-ascii-timestamp (timestamp contents info)
"Transcode a TIMESTAMP object from Org to ASCII.
CONTENTS is nil. INFO is a plist holding contextual information."
- (let ((value (org-translate-time
- (org-element-property :raw-value timestamp))))
- (if (not (eq (plist-get info :ascii-charset) 'utf-8)) value
- (replace-regexp-in-string "--" "–" value))))
+ (org-e-ascii-plain-text (org-export-translate-timestamp timestamp) info))
;;;; Underline
@@ -1768,6 +1738,7 @@ contextual information."
(org-e-ascii--justify-string contents verse-width 'left)
org-e-ascii-quote-margin)))
+
;;; Filters
diff --git a/contrib/lisp/org-e-groff.el b/contrib/lisp/org-e-groff.el
index 81a7363..0da9c62 100644
--- a/contrib/lisp/org-e-groff.el
+++ b/contrib/lisp/org-e-groff.el
@@ -1849,8 +1849,8 @@ information."
"Transcode a TIMESTAMP object from Org to Groff.
CONTENTS is nil. INFO is a plist holding contextual
information."
- (let ((value (org-translate-time
- (org-element-property :raw-value timestamp))))
+ (let ((value (org-e-groff-plain-text
+ (org-export-translate-timestamp timestamp) info)))
(case (org-element-property :type timestamp)
((active active-range)
(format org-e-groff-active-timestamp-format value))
diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
index 4d9926d..811f667 100644
--- a/contrib/lisp/org-e-html.el
+++ b/contrib/lisp/org-e-html.el
@@ -2701,8 +2701,8 @@ 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 :raw-value timestamp))))
+ (let ((value (org-e-html-plain-text
+ (org-export-translate-timestamp timestamp) info)))
(format "<span class=\"timestamp-wrapper\"><span class=\"timestamp\">%s</span></span>"
(replace-regexp-in-string "--" "&ndash;" value))))
diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el
index b7b2903..76e3459 100644
--- a/contrib/lisp/org-e-latex.el
+++ b/contrib/lisp/org-e-latex.el
@@ -2539,23 +2539,12 @@ information."
"Transcode a TIMESTAMP object from Org to LaTeX.
CONTENTS is nil. INFO is a plist holding contextual
information."
- (let ((value (org-translate-time
- (org-element-property :raw-value timestamp))))
+ (let ((value (org-e-latex-plain-text
+ (org-export-translate-timestamp timestamp) info)))
(case (org-element-property :type timestamp)
- (active (format org-e-latex-active-timestamp-format value))
- (active-range
- (let ((timestamps (org-split-string value "--")))
- (concat
- (format org-e-latex-active-timestamp-format (car timestamps))
- "--"
- (format org-e-latex-active-timestamp-format (cdr timestamps)))))
- (inactive (format org-e-latex-inactive-timestamp-format value))
- (inactive-range
- (let ((timestamps (org-split-string value "--")))
- (concat
- (format org-e-latex-inactive-timestamp-format (car timestamps))
- "--"
- (format org-e-latex-inactive-timestamp-format (cdr timestamps)))))
+ ((active active-range) (format org-e-latex-active-timestamp-format value))
+ ((inactive inactive-range)
+ (format org-e-latex-inactive-timestamp-format value))
(otherwise (format org-e-latex-diary-timestamp-format value)))))
diff --git a/contrib/lisp/org-e-texinfo.el b/contrib/lisp/org-e-texinfo.el
index 8a050ee..d006c07 100644
--- a/contrib/lisp/org-e-texinfo.el
+++ b/contrib/lisp/org-e-texinfo.el
@@ -1601,8 +1601,8 @@ information."
"Transcode a TIMESTAMP object from Org to Texinfo.
CONTENTS is nil. INFO is a plist holding contextual
information."
- (let ((value (org-translate-time
- (org-element-property :raw-value timestamp))))
+ (let ((value (org-e-texinfo-plain-text
+ (org-export-translate-timestamp timestamp) info)))
(case (org-element-property :type timestamp)
((active active-range)
(format org-e-texinfo-active-timestamp-format value))