Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2014-05-12 22:21:33 +02:00
commit 089a13b2f3
1 changed files with 18 additions and 19 deletions

View File

@ -2194,9 +2194,8 @@ INFO is a plist containing export directives."
DATA is a parse tree, an element or an object or a secondary DATA is a parse tree, an element or an object or a secondary
string. INFO is a plist holding export options. string. INFO is a plist holding export options.
Return transcoded string." Return a string."
(let ((memo (gethash data (plist-get info :exported-data) 'no-memo))) (or (gethash data (plist-get info :exported-data))
(if (not (eq memo 'no-memo)) memo
(let* ((type (org-element-type data)) (let* ((type (org-element-type data))
(results (results
(cond (cond
@ -2212,9 +2211,9 @@ Return transcoded string."
;; Secondary string. ;; Secondary string.
((not type) ((not type)
(mapconcat (lambda (obj) (org-export-data obj info)) data "")) (mapconcat (lambda (obj) (org-export-data obj info)) data ""))
;; Element/Object without contents or, as a special case, ;; Element/Object without contents or, as a special
;; headline with archive tag and archived trees restricted ;; case, headline with archive tag and archived trees
;; to title only. ;; restricted to title only.
((or (not (org-element-contents data)) ((or (not (org-element-contents data))
(and (eq type 'headline) (and (eq type 'headline)
(eq (plist-get info :with-archived-trees) 'headline) (eq (plist-get info :with-archived-trees) 'headline)
@ -2239,16 +2238,16 @@ Return transcoded string."
(lambda (element) (org-export-data element info)) (lambda (element) (org-export-data element info))
(org-element-contents (org-element-contents
(if (or greaterp objectp) data (if (or greaterp objectp) data
;; Elements directly containing objects ;; Elements directly containing
;; must have their indentation normalized ;; objects must have their indentation
;; first. ;; normalized first.
(org-element-normalize-contents (org-element-normalize-contents
data data
;; When normalizing contents of the first ;; When normalizing contents of the
;; paragraph in an item or a footnote ;; first paragraph in an item or
;; definition, ignore first line's ;; a footnote definition, ignore
;; indentation: there is none and it ;; first line's indentation: there is
;; might be misleading. ;; none and it might be misleading.
(when (eq type 'paragraph) (when (eq type 'paragraph)
(let ((parent (org-export-get-parent data))) (let ((parent (org-export-get-parent data)))
(and (and
@ -2265,10 +2264,10 @@ Return transcoded string."
(puthash (puthash
data data
(cond (cond
((not results) nil) ((not results) "")
((memq type '(org-data plain-text nil)) results) ((memq type '(org-data plain-text nil)) results)
;; Append the same white space between elements or objects as in ;; Append the same white space between elements or objects
;; the original buffer, and call appropriate filters. ;; as in the original buffer, and call appropriate filters.
(t (t
(let ((results (let ((results
(org-export-filter-apply-functions (org-export-filter-apply-functions
@ -2278,10 +2277,10 @@ Return transcoded string."
(if (memq type org-element-all-elements) (if (memq type org-element-all-elements)
(concat (org-element-normalize-string results) (concat (org-element-normalize-string results)
(make-string post-blank ?\n)) (make-string post-blank ?\n))
(concat results (make-string post-blank ? )))) (concat results (make-string post-blank ?\s))))
info))) info)))
results))) results)))
(plist-get info :exported-data)))))) (plist-get info :exported-data)))))
(defun org-export-data-with-backend (data backend info) (defun org-export-data-with-backend (data backend info)
"Convert DATA into BACKEND format. "Convert DATA into BACKEND format.