branch: externals-release/org
commit be39e61c4efa5027536809c89b90bfe66b76b712
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    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....@gnu.org/
---
 lisp/org-persist.el | 4 ++--
 lisp/ox.el          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index c855c6604b..52f4b0eef2 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -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
diff --git a/lisp/ox.el b/lisp/ox.el
index 29390bf0e4..35bbf84a0c 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -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

Reply via email to