org-persist: Work around Emacs bug#58687

* lisp/org-persist.el (org-persist--write-elisp-file): Bind
`pp-use-max-width' to nil when using `pp'.  Otherwise, printing
quickly becomes slow.

Reported-by: Michael Eliachevitch <m.eliachevitch@posteo.de>
Link: https://orgmode.org/list/87wn8tb3zp.fsf@posteo.de
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58687
This commit is contained in:
Ihor Radchenko 2023-01-20 11:44:57 +03:00
parent cbb288eaa5
commit ecdb442044
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 1 deletions

View File

@ -335,7 +335,8 @@ FORMAT and ARGS are passed to `message'."
(make-directory (file-name-directory file) t))
(with-temp-file file
(if pp
(pp data (current-buffer))
(let ((pp-use-max-width nil)) ; Emacs bug#58687
(pp data (current-buffer)))
(prin1 data (current-buffer))))
(org-persist--display-time
(- (float-time) start-time)