unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 52554@debbugs.gnu.org, schwab@linux-m68k.org
Subject: bug#52554: 28.0.90; mm-inline-media-tests customization breaks .emacs reading
Date: Fri, 17 Dec 2021 09:45:17 +0100	[thread overview]
Message-ID: <87ee6boc0y.fsf@gmail.com> (raw)
In-Reply-To: <83mtkzeisq.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Dec 2021 10:29:09 +0200")

>>>>> On Fri, 17 Dec 2021 10:29:09 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: Andreas Schwab <schwab@linux-m68k.org>,  52554@debbugs.gnu.org
    >> Date: Fri, 17 Dec 2021 09:23:48 +0100
    >> 
    >> >> I'd rather think that custom-save-variable should bind
    >> >> print-escape-control-characters to t.
    >> 
    Eli> Maybe we should do both?
    >> 
    >> In `custom-save-all' perhaps? There are many code paths for saving
    >> customizations, they donʼt all go via `custom-save-variable'.

    Eli> If they all go through custom-save-all, then I think it should be done
    Eli> there, yes.

OK, Iʼll run with the following for a while, and see if anything crops
up.

diff --git c/lisp/cus-edit.el i/lisp/cus-edit.el
index 5c4448ae71..1936733098 100644
--- c/lisp/cus-edit.el
+++ i/lisp/cus-edit.el
@@ -4723,7 +4723,10 @@ custom-save-all
         (delay-mode-hooks (emacs-lisp-mode)))
       (let ((inhibit-read-only t)
 	    (print-length nil)
-	    (print-level nil))
+	    (print-level nil)
+            ;; We might be saving byte-code with embedded NULs, which can
+            ;; cause problems when read back (Bug#52554).
+            (print-escape-control-characters t))
         (atomic-change-group
 	  (custom-save-variables)
 	  (custom-save-faces)))
diff --git c/lisp/startup.el i/lisp/startup.el
index 505d7b83f4..f8db46ff3f 100644
--- c/lisp/startup.el
+++ i/lisp/startup.el
@@ -964,7 +964,11 @@ startup--load-user-init-file
         (debug-on-error-initial
          (if (eq init-file-debug t)
              'startup
-           init-file-debug)))
+           init-file-debug))
+        ;; The init file might contain byte-code with embedded NULs,
+        ;; which can cause problems when read back, so disable null
+        ;; byte detection (Bug#52554).
+        (inhibit-null-byte-detection t))
     (let ((debug-on-error debug-on-error-initial))
       (condition-case-unless-debug error
           (when init-file-user

Robert
-- 





  reply	other threads:[~2021-12-17  8:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-16 15:18 bug#52554: 28.0.90; mm-inline-media-tests customization breaks .emacs reading Robert Pluim
2021-12-16 15:30 ` Eli Zaretskii
2021-12-16 15:46   ` Robert Pluim
2021-12-16 16:57     ` Eli Zaretskii
2021-12-16 16:13   ` Andreas Schwab
2021-12-16 16:58     ` Eli Zaretskii
2021-12-17  8:23       ` Robert Pluim
2021-12-17  8:29         ` Eli Zaretskii
2021-12-17  8:45           ` Robert Pluim [this message]
2021-12-17 12:11             ` Eli Zaretskii
2022-03-16 18:02               ` Robert Pluim
2021-12-19 12:01 ` Lars Ingebrigtsen
     [not found]   ` <87h7b3ve9a.fsf@gmail.com>
2021-12-20  9:22     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee6boc0y.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=52554@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).