GNU bug report logs - #79124
emacs -Q doesn't give me a clean slate

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Wed, 30 Jul 2025 00:00:02 UTC

Severity: normal

Full log


Message #80 received at 79124 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rpluim <at> gmail.com, 79124 <at> debbugs.gnu.org, rms <at> gnu.org
Subject: Re: bug#79124: emacs -Q doesn't give me a clean slate
Date: Mon, 4 Aug 2025 10:19:12 -0700
On 2025-08-04 05:22, Eli Zaretskii wrote:
> if setting HOME to a non-existent directory gives you what you want

It doesn't, for several reasons.

* Emacs outputs spurious diagnostics. It shouldn't.

* It's a pain to communicate with other users when diagnosing. I should 
be able to tell them "run emacs -QQ". But currently I have to tell them 
something like "get a copy of the Emacs source, run './configure 
--prefix=$HOME/prefix --with-native-compilation=aot', run 'make install' 
(this may a long time; be patient), set HOME to a nonexistent directory 
whose parent directory is unwritable, then run $HOME/prefix/bin/emacs -Q 
except use the old HOME not the new one and make sure you are not a 
superuser, and ignore the following worrisome-looking diagnostics". If 
they make a single mistake (say, they run as root) the whole thing falls 
apart. This is so awkward and unfriendly that I won't even bother.

* When using Emacs in this way, I can't edit my own files conveniently. 
I have to use tell Emacs a name like "~eggert/foo" where I should be 
able to say just "~/foo".

There are probably other reasons, these are just off the top of my head.

> I'm talking about much more subtle issues, like the need to compile
> trampolines required in some cases.

Although I don't know what those subtle issues are, I don't see what 
they have to do with accessing $HOME when Emacs starts up. If Emacs 
needs to read files under $HOME to compile trampolines (why?) and $HOME 
is off-limits, it can access files in /tmp like other programs do.

> I thought, perhaps mistakenly, that you
> wanted to prevent Emacs from accessing the home directory when that
> directory did exist

No, I just want Emacs to skip the user-specific configuration it 
normally does, so that I'm running a vanilla Emacs rather than a 
tailored Emacs. This helps make tests more reproducible. I don't want to 
prevent all accesses to my home directory.

The original intent of -Q was to have a convenient way to have Emacs run 
independently of user-specific configuration. If -Q has strayed away 
from that intent but we can't change its behavior for some backward 
compatibility concern, then we should have a new short option to do the 
original intent.




This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.