Subject: bug#47298: Emacs creates HOME if it does not exist

From: Glenn Morris <[email-masked]>
Date: Thu, 25 Mar 2021 14:28:20 -0400

Eli Zaretskii wrote:

>> From: Glenn Morris <[email-masked]>
>> Date: Sun, 21 Mar 2021 13:40:53 -0400
>> 
>> IMO the Emacs 26.3 behaviour is correct, and Emacs should not be
>> creating HOME if it does not exist.
>
> I'm not sure I agree with you.  What do other programs do in this
> situation?

Dunno.
IMO applications should not be creating HOME, that is a system-level
responsibility.
Missing HOME indicates either a deliberate choice, or a system-level
problem that the application should not try to fix (in most cases, it
won't even have permission to do so) but should just report.

> And if we don't create ~/.emacs.d, how can we save user's
> customizations?

You don't, you give a warning.

> That might mean we need to find other ways of isolating tests from
> user customizations.

Your only alternative is to have the test machinery make a temporary but
existing HOME and ensure it is deleted afterwards.
But IMO that is a separate issue.
Even if that change is made, I still don't believe Emacs should create HOME.