forked from mirrors/org-mode
Revert "org-export-data: Concatenate strings in temporary buffer for performance"
This reverts commit a158b263a6
.
The commit actually makes not measurable performance difference.
This commit is contained in:
parent
9b00f4bf1d
commit
811deae32d
50
lisp/ox.el
50
lisp/ox.el
|
@ -1927,34 +1927,28 @@ Return a string."
|
||||||
(and (not greaterp)
|
(and (not greaterp)
|
||||||
(memq type org-element-recursive-objects)))
|
(memq type org-element-recursive-objects)))
|
||||||
(contents
|
(contents
|
||||||
(let ((export-buffer (current-buffer)))
|
(mapconcat
|
||||||
(with-temp-buffer
|
(lambda (element) (org-export-data element info))
|
||||||
(dolist (element (org-element-contents
|
(org-element-contents
|
||||||
(if (or greaterp objectp) data
|
(if (or greaterp objectp) data
|
||||||
;; Elements directly containing
|
;; Elements directly containing
|
||||||
;; objects must have their indentation
|
;; objects must have their indentation
|
||||||
;; normalized first.
|
;; normalized first.
|
||||||
(org-element-normalize-contents
|
(org-element-normalize-contents
|
||||||
data
|
data
|
||||||
;; When normalizing first paragraph
|
;; When normalizing first paragraph
|
||||||
;; of an item or
|
;; of an item or
|
||||||
;; a footnote-definition, ignore
|
;; a footnote-definition, ignore
|
||||||
;; first line's indentation.
|
;; first line's indentation.
|
||||||
(and
|
(and
|
||||||
(eq type 'paragraph)
|
(eq type 'paragraph)
|
||||||
(memq (org-element-type parent)
|
(memq (org-element-type parent)
|
||||||
'(footnote-definition item))
|
'(footnote-definition item))
|
||||||
(eq (car (org-element-contents parent))
|
(eq (car (org-element-contents parent))
|
||||||
data)
|
data)
|
||||||
(eq (org-element-property :pre-blank parent)
|
(eq (org-element-property :pre-blank parent)
|
||||||
0))))))
|
0)))))
|
||||||
(insert
|
"")))
|
||||||
;; Use right local variable
|
|
||||||
;; environment if there are, for
|
|
||||||
;; example, #+BIND variables.
|
|
||||||
(with-current-buffer export-buffer
|
|
||||||
(org-export-data element info))))
|
|
||||||
(buffer-string)))))
|
|
||||||
(broken-link-handler
|
(broken-link-handler
|
||||||
(funcall transcoder data
|
(funcall transcoder data
|
||||||
(if (not greaterp) contents
|
(if (not greaterp) contents
|
||||||
|
|
Loading…
Reference in a new issue