Subject: bug#79124: emacs -Q doesn't give me a clean slate

From: Robert Pluim <[email-masked]>
Date: Wed, 30 Jul 2025 16:11:15 +0200

>>>>> On Wed, 30 Jul 2025 15:15:49 +0300, Eli Zaretskii <[email-masked]> said:

    >> Date: Tue, 29 Jul 2025 16:59:23 -0700
    >> From: Paul Eggert <[email-masked]>
    >> 
    >> Over the years Emacs has come slurp more and more files from the user's 
    >> home directory, which is fine except that 'emacs -Q' is supposed to 
    >> suppress this sort of thing, partly to help debugging so that one can 
    >> easily have a clean Emacs to test with.
    >> 
    >> Unfortunately, nowadays 'emacs -Q' now has some questionable accesses to 
    >> configuration files or caches. I did an "cd /tmp" followed by an "strace 
    >> emacs -Q -nw" using Emacs master (on Fedora 42) where I immediately 
    >> typed C-x C-c to exit, and found that Emacs accessed or attempted to 
    >> access the following files under my home directory. -Q should disable 
    >> these accesses; or if -Q is not the right way to do that, there should 
    >> be an easy way to tell Emacs "start with a clean slate; don't access any 
    >> of my startup configuration or cache or whatever".
    >> 
    >> .abbrev_defs
    >> .emacs.d
    >> .emacs.d/
    >> .emacs.d/./
    >> .emacs.d/abbrev_defs

We sometimes also read from .emacs.d/network-security.data under -Q,
which can be annoying when testing TLS code. I canʼt remember exactly
the cause, since Iʼve long switched to "HOME=/tmp/emacs src/emacs -Q".

Robert
--