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:
Ihor Radchenko 2022-06-17 19:30:43 +08:00
parent 9b00f4bf1d
commit 811deae32d
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 22 additions and 28 deletions

View File

@ -1927,34 +1927,28 @@ Return a string."
(and (not greaterp)
(memq type org-element-recursive-objects)))
(contents
(let ((export-buffer (current-buffer)))
(with-temp-buffer
(dolist (element (org-element-contents
(if (or greaterp objectp) data
;; Elements directly containing
;; objects must have their indentation
;; normalized first.
(org-element-normalize-contents
data
;; When normalizing first paragraph
;; of an item or
;; a footnote-definition, ignore
;; first line's indentation.
(and
(eq type 'paragraph)
(memq (org-element-type parent)
'(footnote-definition item))
(eq (car (org-element-contents parent))
data)
(eq (org-element-property :pre-blank parent)
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)))))
(mapconcat
(lambda (element) (org-export-data element info))
(org-element-contents
(if (or greaterp objectp) data
;; Elements directly containing
;; objects must have their indentation
;; normalized first.
(org-element-normalize-contents
data
;; When normalizing first paragraph
;; of an item or
;; a footnote-definition, ignore
;; first line's indentation.
(and
(eq type 'paragraph)
(memq (org-element-type parent)
'(footnote-definition item))
(eq (car (org-element-contents parent))
data)
(eq (org-element-property :pre-blank parent)
0)))))
"")))
(broken-link-handler
(funcall transcoder data
(if (not greaterp) contents