org-element: Rename `time-stamp' object type into `timestamp'

This commit is contained in:
Nicolas Goaziou 2012-04-29 02:23:09 +02:00
parent 941f90a649
commit b5f4b526ca
6 changed files with 62 additions and 64 deletions

View File

@ -39,8 +39,6 @@
(declare-function org-element-normalize-string "org-element" (s))
(declare-function org-element-map "org-element"
(data types fun &optional info first-match))
(declare-function org-element-time-stamp-interpreter
"org-element" (time-stamp contents))
(declare-function org-export-collect-footnote-definitions
"org-export" (data info))
@ -1753,12 +1751,12 @@ a communication channel."
;; Targets are invisible.
;;;; Time-stamp
;;;; Timestamp
(defun org-e-ascii-time-stamp (time-stamp contents info)
"Transcode a TIME-STAMP object from Org to ASCII.
(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."
(org-translate-time (org-element-property :value time-stamp)))
(org-translate-time (org-element-property :value timestamp)))
;;;; Underline

View File

@ -582,7 +582,7 @@ CSS classes, then this prefix can be very useful."
:group 'org-export-e-html
:type 'string)
;;;; Time-stamps
;;;; Timestamps
;;;; Statistics Cookie
;;;; Subscript
;;;; Superscript
@ -785,7 +785,7 @@ When nil, also column one will use data tags."
;;;; Target
;;;; Time-stamp
;;;; Timestamp
;;;; Verbatim
;;;; Verse Block
@ -895,20 +895,20 @@ returned as-is."
:type 'string)
;;;; Time-stamps
;;;; Timestamps
(defcustom org-e-html-active-timestamp-format "\\textit{%s}"
"A printf format string to be applied to active time-stamps."
"A printf format string to be applied to active timestamps."
:group 'org-export-e-html
:type 'string)
(defcustom org-e-html-inactive-timestamp-format "\\textit{%s}"
"A printf format string to be applied to inactive time-stamps."
"A printf format string to be applied to inactive timestamps."
:group 'org-export-e-html
:type 'string)
(defcustom org-e-html-diary-timestamp-format "\\textit{%s}"
"A printf format string to be applied to diary time-stamps."
"A printf format string to be applied to diary timestamps."
:group 'org-export-e-html
:type 'string)
@ -2978,13 +2978,13 @@ information."
(format "<a id=\"%s\" name=\"%s\"/>" id id)))
;;;; Time-stamp
;;;; Timestamp
(defun org-e-html-time-stamp (time-stamp contents info)
"Transcode a TIME-STAMP object from Org to HTML.
(defun org-e-html-timestamp (timestamp contents info)
"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 time-stamp))))
(let ((value (org-translate-time (org-element-property :value timestamp))))
(format "<span class=\"timestamp-wrapper\"><span class=\"timestamp\">%s</span></span>"
value)))

View File

@ -298,20 +298,20 @@ order to reproduce the default set-up:
:type 'string)
;;;; Time-stamps
;;;; Timestamps
(defcustom org-e-latex-active-timestamp-format "\\textit{%s}"
"A printf format string to be applied to active time-stamps."
"A printf format string to be applied to active timestamps."
:group 'org-export-e-latex
:type 'string)
(defcustom org-e-latex-inactive-timestamp-format "\\textit{%s}"
"A printf format string to be applied to inactive time-stamps."
"A printf format string to be applied to inactive timestamps."
:group 'org-export-e-latex
:type 'string)
(defcustom org-e-latex-diary-timestamp-format "\\textit{%s}"
"A printf format string to be applied to diary time-stamps."
"A printf format string to be applied to diary timestamps."
:group 'org-export-e-latex
:type 'string)
@ -2157,14 +2157,14 @@ information."
(org-export-solidify-link-text (org-element-property :value target))))
;;;; Time-stamp
;;;; Timestamp
(defun org-e-latex-time-stamp (time-stamp contents info)
"Transcode a TIME-STAMP object from Org to LaTeX.
(defun org-e-latex-timestamp (timestamp contents info)
"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 :value time-stamp)))
(type (org-element-property :type time-stamp)))
(let ((value (org-translate-time (org-element-property :value timestamp)))
(type (org-element-property :type timestamp)))
(cond ((memq type '(active active-range))
(format org-e-latex-active-timestamp-format value))
((memq type '(inactive inactive-range))

View File

@ -2280,7 +2280,7 @@ configuration."
;;;; Tags
;;;; Time-stamps
;;;; Timestamps
;;;; Statistics Cookie
;;;; Subscript
;;;; Superscript
@ -2327,7 +2327,7 @@ configuration."
;;;; Table
;;;; Target
;;;; Time-stamp
;;;; Timestamp
;;;; Verbatim
;;;; Verse Block
@ -2378,20 +2378,20 @@ order to reproduce the default set-up:
;;;; Footnotes
;;;; Time-stamps
;;;; Timestamps
(defcustom org-e-odt-active-timestamp-format "\\textit{%s}"
"A printf format string to be applied to active time-stamps."
"A printf format string to be applied to active timestamps."
:group 'org-export-e-odt
:type 'string)
(defcustom org-e-odt-inactive-timestamp-format "\\textit{%s}"
"A printf format string to be applied to inactive time-stamps."
"A printf format string to be applied to inactive timestamps."
:group 'org-export-e-odt
:type 'string)
(defcustom org-e-odt-diary-timestamp-format "\\textit{%s}"
"A printf format string to be applied to diary time-stamps."
"A printf format string to be applied to diary timestamps."
:group 'org-export-e-odt
:type 'string)
@ -4146,15 +4146,15 @@ information."
"" (org-export-solidify-link-text (org-element-property :value target))))
;;;; Time-stamp
;;;; Timestamp
(defun org-e-odt-time-stamp (time-stamp contents info)
"Transcode a TIME-STAMP object from Org to HTML.
(defun org-e-odt-timestamp (timestamp contents info)
"Transcode a TIMESTAMP object from Org to HTML.
CONTENTS is nil. INFO is a plist used as a communication
channel."
(org-e-odt-format-fontify
(org-e-odt-format-fontify
(org-translate-time (org-element-property :value time-stamp))
(org-translate-time (org-element-property :value timestamp))
"timestamp")
"timestamp-wrapper"))

View File

@ -56,7 +56,7 @@
;; `inline-babel-call', `inline-src-block', `italic',
;; `latex-fragment', `line-break', `link', `macro', `radio-target',
;; `statistics-cookie', `strike-through', `subscript', `superscript',
;; `table-cell', `target', `time-stamp', `underline' and `verbatim'.
;; `table-cell', `target', `timestamp', `underline' and `verbatim'.
;;
;; Some elements also have special properties whose value can hold
;; objects themselves (i.e. an item tag or an headline name). Such
@ -2678,15 +2678,15 @@ beginning position."
(cons 'target (match-beginning 0)))))
;;;; Time-stamp
;;;; Timestamp
(defun org-element-time-stamp-parser ()
(defun org-element-timestamp-parser ()
"Parse time stamp at point.
Return a list whose CAR is `time-stamp', and CDR a plist with
Return a list whose CAR is `timestamp', and CDR a plist with
`:type', `:begin', `:end', `:value' and `:post-blank' keywords.
Assume point is at the beginning of the time-stamp."
Assume point is at the beginning of the timestamp."
(save-excursion
(let* ((begin (point))
(type (cond
@ -2704,24 +2704,24 @@ Assume point is at the beginning of the time-stamp."
(post-blank (progn (goto-char (match-end 0))
(skip-chars-forward " \t")))
(end (point)))
`(time-stamp
`(timestamp
(:type ,type
:value ,value
:begin ,begin
:end ,end
:post-blank ,post-blank)))))
(defun org-element-time-stamp-interpreter (time-stamp contents)
"Interpret TIME-STAMP object as Org syntax.
(defun org-element-timestamp-interpreter (timestamp contents)
"Interpret TIMESTAMP object as Org syntax.
CONTENTS is nil."
(org-element-property :value time-stamp))
(org-element-property :value timestamp))
(defun org-element-time-stamp-successor (limit)
"Search for the next time-stamp object.
(defun org-element-timestamp-successor (limit)
"Search for the next timestamp object.
LIMIT bounds the search.
Return value is a cons cell whose CAR is `time-stamp' and CDR is
Return value is a cons cell whose CAR is `timestamp' and CDR is
beginning position."
(save-excursion
(when (re-search-forward
@ -2731,7 +2731,7 @@ beginning position."
"\\|"
"\\(?:<%%\\(?:([^>\n]+)\\)>\\)")
limit t)
(cons 'time-stamp (match-beginning 0)))))
(cons 'timestamp (match-beginning 0)))))
;;;; Underline
@ -2846,7 +2846,7 @@ CONTENTS is nil."
'(export-snippet footnote-reference inline-babel-call inline-src-block
latex-or-entity line-break link macro radio-target
statistics-cookie sub/superscript table-cell target
text-markup time-stamp)
text-markup timestamp)
"Complete list of successors.")
(defconst org-element-object-successor-alist
@ -2864,7 +2864,7 @@ regexp matching one object can also match the other object.")
'(bold code entity export-snippet footnote-reference inline-babel-call
inline-src-block italic line-break latex-fragment link macro
radio-target statistics-cookie strike-through subscript superscript
table-cell target time-stamp underline verbatim)
table-cell target timestamp underline verbatim)
"Complete list of object types.")
(defconst org-element-recursive-objects
@ -2931,18 +2931,18 @@ This list is checked after translations have been applied. See
(defconst org-element-object-restrictions
`((bold entity export-snippet inline-babel-call inline-src-block link
radio-target sub/superscript target text-markup time-stamp)
radio-target sub/superscript target text-markup timestamp)
(footnote-reference entity export-snippet footnote-reference
inline-babel-call inline-src-block latex-fragment
line-break link macro radio-target sub/superscript
target text-markup time-stamp)
target text-markup timestamp)
(headline entity inline-babel-call inline-src-block latex-fragment link
macro radio-target statistics-cookie sub/superscript text-markup
time-stamp)
timestamp)
(inlinetask entity inline-babel-call inline-src-block latex-fragment link
macro radio-target sub/superscript text-markup time-stamp)
macro radio-target sub/superscript text-markup timestamp)
(italic entity export-snippet inline-babel-call inline-src-block link
radio-target sub/superscript target text-markup time-stamp)
radio-target sub/superscript target text-markup timestamp)
(item entity inline-babel-call latex-fragment macro radio-target
sub/superscript target text-markup)
(keyword entity latex-fragment macro sub/superscript text-markup)
@ -2953,19 +2953,19 @@ This list is checked after translations have been applied. See
(radio-target entity export-snippet latex-fragment sub/superscript)
(strike-through entity export-snippet inline-babel-call inline-src-block
link radio-target sub/superscript target text-markup
time-stamp)
timestamp)
(subscript entity export-snippet inline-babel-call inline-src-block
latex-fragment sub/superscript text-markup)
(superscript entity export-snippet inline-babel-call inline-src-block
latex-fragment sub/superscript text-markup)
(table-cell entity export-snippet latex-fragment link macro radio-target
sub/superscript target text-markup time-stamp)
sub/superscript target text-markup timestamp)
(table-row table-cell)
(underline entity export-snippet inline-babel-call inline-src-block link
radio-target sub/superscript target text-markup time-stamp)
radio-target sub/superscript target text-markup timestamp)
(verse-block entity footnote-reference inline-babel-call inline-src-block
latex-fragment line-break link macro radio-target
sub/superscript target text-markup time-stamp))
sub/superscript target text-markup timestamp))
"Alist of objects restrictions.
CAR is an element or object type containing objects and CDR is

View File

@ -229,7 +229,7 @@ way they are handled must be hard-coded into
(:filter-table-cell . org-export-filter-table-cell-functions)
(:filter-table-row . org-export-filter-table-row-functions)
(:filter-target . org-export-filter-target-functions)
(:filter-time-stamp . org-export-filter-time-stamp-functions)
(:filter-timestamp . org-export-filter-timestamp-functions)
(:filter-underline . org-export-filter-underline-functions)
(:filter-verbatim . org-export-filter-verbatim-functions)
(:filter-verse-block . org-export-filter-verse-block-functions))
@ -1486,8 +1486,8 @@ OPTIONS is the plist holding export options."
(and (memq with-tasks '(todo done))
(not (eq todo-type with-tasks)))
(and (consp with-tasks) (not (member todo with-tasks))))))))
;; Check time-stamp.
(time-stamp (not (plist-get options :with-timestamps)))
;; Check timestamp.
(timestamp (not (plist-get options :with-timestamps)))
;; Check drawer.
(drawer
(or (not (plist-get options :with-drawers))
@ -2049,8 +2049,8 @@ Each filter is called with three arguments: the transcoded data,
as a string, the back-end, as a symbol, and the communication
channel, as a plist. It must return a string or nil.")
(defvar org-export-filter-time-stamp-functions nil
"List of functions applied to a transcoded time-stamp.
(defvar org-export-filter-timestamp-functions nil
"List of functions applied to a transcoded timestamp.
Each filter is called with three arguments: the transcoded data,
as a string, the back-end, as a symbol, and the communication
channel, as a plist. It must return a string or nil.")