1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

Use emacs-internal coding system to read/write Elisp data

* lisp/org-persist.el (org-persist--read-elisp-file):
(org-persist--write-elisp-file):
* lisp/ox.el (org-export-async-start):

Suggested by Emacs maintainer.

Link: https://list.orgmode.org/861q4zy0va.fsf@gnu.org/
This commit is contained in:
Ihor Radchenko 2024-06-15 15:45:40 +02:00
parent 1387e36135
commit be39e61c4e
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
2 changed files with 3 additions and 3 deletions

View File

@ -416,7 +416,7 @@ FORMAT and ARGS are passed to `message'."
(defun org-persist--read-elisp-file (&optional buffer-or-file)
"Read elisp data from BUFFER-OR-FILE or current buffer."
(let (;; UTF-8 is explicitly used in `org-persist--write-elisp-file'.
(coding-system-for-read 'utf-8)
(coding-system-for-read 'emacs-internal)
(buffer-or-file (or buffer-or-file (current-buffer))))
(with-temp-buffer
(if (bufferp buffer-or-file)
@ -464,7 +464,7 @@ FORMAT and ARGS are passed to `message'."
(let ((write-region-inhibit-fsync t)
;; We set UTF-8 here and in `org-persist--read-elisp-file'
;; to avoid the overhead from `find-auto-coding'.
(coding-system-for-write 'utf-8)
(coding-system-for-write 'emacs-internal)
(print-circle (not no-circular))
print-level
print-length

View File

@ -6671,7 +6671,7 @@ and `org-export-to-file' for more specialized functions."
(with-temp-message "Initializing asynchronous export process"
(let ((copy-fun (org-element--generate-copy-script (current-buffer)))
(temp-file (make-temp-file "org-export-process")))
(let ((coding-system-for-write 'utf-8-emacs-unix))
(let ((coding-system-for-write 'emacs-internal))
(write-region
;; Null characters (from variable values) are inserted
;; within the file. As a consequence, coding system for