mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-15 21:09:54 +00:00
Backport commit 979308b4c from Emacs
* lisp/ox.el (org-export-data): Use temporary buffer to collect export data instead of `mapconcat'. Using buffer puts less load on garbage collector. org-export-data: Concatenate strings in temporary buffer for performance 979308b4cad2b573606ed71a1689a47a9e7a9e98 Ihor Radchenko Thu Jun 16 10:53:51 2022 +0300 [ km: This ported commit comes from main'sa158b263a
and was reverted in811deae32
. I'm applying it here too for bookkeeping/traceability purposes, but these changes will be discarded when merged with main. ]
This commit is contained in:
parent
4ae72c6174
commit
8ac9203d5c
16
lisp/ox.el
16
lisp/ox.el
|
@ -1925,9 +1925,9 @@ Return a string."
|
|||
(and (not greaterp)
|
||||
(memq type org-element-recursive-objects)))
|
||||
(contents
|
||||
(mapconcat
|
||||
(lambda (element) (org-export-data element info))
|
||||
(org-element-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
|
||||
|
@ -1945,8 +1945,14 @@ Return a string."
|
|||
(eq (car (org-element-contents parent))
|
||||
data)
|
||||
(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
|
||||
(funcall transcoder data
|
||||
(if (not greaterp) contents
|
||||
|
|
Loading…
Reference in a new issue