GNU bug report logs - #47298
Emacs creates HOME if it does not exist

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Glenn Morris <rgm@HIDDEN>; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 29.1, send any further explanations to 47298 <at> debbugs.gnu.org and Glenn Morris <rgm@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 47298 <at> debbugs.gnu.org:


Received: (at 47298) by debbugs.gnu.org; 25 Jun 2022 15:28:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 25 11:28:51 2022
Received: from localhost ([127.0.0.1]:46048 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1o57iM-0001fP-QR
	for submit <at> debbugs.gnu.org; Sat, 25 Jun 2022 11:28:50 -0400
Received: from quimby.gnus.org ([95.216.78.240]:46442)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1o57iJ-0001f6-8P
 for 47298 <at> debbugs.gnu.org; Sat, 25 Jun 2022 11:28:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=O87b08h92JSpwqfkdn1MFy6XDZu7zIhfWzjj+ZDOd0Q=; b=prfPvVLdfblLxzGIORHHckpp1W
 7jHZNrqIeSzbd7zntPAt9+d4+4J7O0X5dMTjdYeZcngKIkxjqoNcANgHKqpsr0R8ClIq8emB6Wk7A
 iPuRiweqjg0G+/91JMzntNNT3u0FTOZJdHcD9hNmPI8EuMoTkp0k2+yAcMtJBHBJUYXA=;
Received: from 77.19.134.30.tmi.telenormobil.no ([77.19.134.30] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1o57iA-0007uE-1J; Sat, 25 Jun 2022 17:28:40 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#47298: Emacs creates HOME if it does not exist
References: <20lfag5rru.fsf@HIDDEN>
Date: Sat, 25 Jun 2022 17:28:37 +0200
In-Reply-To: <20lfag5rru.fsf@HIDDEN> (Glenn Morris's message of
 "Sun, 21 Mar 2021 13:40:53 -0400")
Message-ID: <87o7yghie2.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Glenn Morris <rgm@HIDDEN> writes: > IMO the Emacs 26.3
 behaviour
 is correct, and Emacs should not be > creating HOME if it does not exist.
 One may want to set a non-existent > HOME eg for testing. I've now fixed
 this in Emacs 29. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 0.0 TVD_RCVD_IP            Message was received from an IP address
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 47298
Cc: 47298 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Glenn Morris <rgm@HIDDEN> writes:

> IMO the Emacs 26.3 behaviour is correct, and Emacs should not be
> creating HOME if it does not exist. One may want to set a non-existent
> HOME eg for testing.

I've now fixed this in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47298; Package emacs. Full text available.

Message received at 47298 <at> debbugs.gnu.org:


Received: (at 47298) by debbugs.gnu.org; 26 Mar 2021 09:18:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 26 05:18:55 2021
Received: from localhost ([127.0.0.1]:40427 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPicJ-00087V-7n
	for submit <at> debbugs.gnu.org; Fri, 26 Mar 2021 05:18:55 -0400
Received: from stw1.rcdrun.com ([217.170.207.13]:53719)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bugs@HIDDEN>) id 1lPicH-00087G-RH
 for 47298 <at> debbugs.gnu.org; Fri, 26 Mar 2021 05:18:54 -0400
Received: from localhost ([::ffff:41.210.143.10])
 (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384)
 by stw1.rcdrun.com with ESMTPSA
 id 0000000000027F3C.00000000605DA6F7.00005CB8; Fri, 26 Mar 2021 02:18:46 -0700
Date: Fri, 26 Mar 2021 12:18:20 +0300
From: Jean Louis <bugs@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#47298: Emacs creates HOME if it does not exist
Message-ID: <YF2m3FiO3OUbqmIo@HIDDEN>
References: <20lfag5rru.fsf@HIDDEN> <83wntz9jws.fsf@HIDDEN>
 <uo4kgzdr5n.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
In-Reply-To: <uo4kgzdr5n.fsf@HIDDEN>
User-Agent: Mutt/2.0.6 (2021-03-06)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47298
Cc: Eli Zaretskii <eliz@HIDDEN>, 47298 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* Glenn Morris <rgm@HIDDEN> [2021-03-25 21:29]:
> Eli Zaretskii wrote:
> 
> >> From: Glenn Morris <rgm@HIDDEN>
> >> 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.

Emacs also does not create home directly, it creates its own
configuration directory appended to environment variable $HOME --
which in most cases is home directory of a user, but may not be. Home
directory of a user is located in /etc/passwd and $HOME is
customization that users still can do for other purpose.

If Emacs does not touch /etc/passwd or look for user's home there,
then is not creating user's home, it is creating its configuration
directory as appended to environment variable $HOME -- and other
applications do exactly the same!

Plethora of applications are creating their configurations in
~/.config -- so please look there, you will find all created
directories. 

Applications are then probably finding where is the config directory
by deriving it from $HOME environment variable or $XDG_CONFIG_HOME and
when $XDG_CONFIG_HOME is not there it is derived maybe from
XDG_CONFIG_HOME="$HOME/.config"

> 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.

When application like Emacs runs, it does not "create home" as above
explained, but it wants to create its directory for future
functionality. Using $HOME environment variable is not same as user's
home directory, which is defined in /etc/passwd and need not be
defined in $HOME automatically -- though that is what systems do for
convenience.

I can enter in the system at /root point, it does not matter, $HOME is
where I have permission and my files. 

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

Your assumption that Emacs changes or fiddles with user's home is
incorrect. It works (probably, me insecure) with $HOME variable which
is not equal to user's home, which is irrelevant to user's home
directory! 

I don't agree with this quite, as I use Emacs on Lineage OS, Android
OS, there are setups you do not know, and where this statement does
not apply. In fact there is no specific user's directory on such
systems and it depends of the access:

On the same system:

$ adb shell (but I am not root)
condor:/ $ echo $HOME
/

and I have no permissions to write in that directory, obviously it is
not real home, but I have $HOME.

Then different SSH application would give me different $HOME.

$ ssh motorolausb
$ echo $HOME
/data/data/com.termux/files/home

which is inconvenient, so I like changing $HOME variable to
/storage/emulated/0 as that is where Pictures, and Videos are located
as well, makes more sense to me.

> > 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.

I think it should as all other applications follow that. Creating
$HOME is not same as creating user's home directory as specified in
/etc/passwd -- while similar, those things are not same, I have given
you example from Lineage OS system.

If the configuration directory cannot be created, no warning should be
issued as user is invoking Emacs most probably to edit text and there
is no need to confuse editing with configuration.

When configuration cannot be saved because the directory could not be
created, at the time point of not being able to save configuration,
that is where warning should be issued.

Jean




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47298; Package emacs. Full text available.

Message received at 47298 <at> debbugs.gnu.org:


Received: (at 47298) by debbugs.gnu.org; 25 Mar 2021 18:28:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 25 14:28:41 2021
Received: from localhost ([127.0.0.1]:39576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lPUin-0007SD-F9
	for submit <at> debbugs.gnu.org; Thu, 25 Mar 2021 14:28:41 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51200)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1lPUil-0007S1-Ts
 for 47298 <at> debbugs.gnu.org; Thu, 25 Mar 2021 14:28:40 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:57314)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rgm@HIDDEN>) id 1lPUig-0007kO-Nh
 for 47298 <at> debbugs.gnu.org; Thu, 25 Mar 2021 14:28:34 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1lPUiS-00041O-Bf; Thu, 25 Mar 2021 14:28:22 -0400
From: Glenn Morris <rgm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#47298: Emacs creates HOME if it does not exist
References: <20lfag5rru.fsf@HIDDEN> <83wntz9jws.fsf@HIDDEN>
X-Spook: Ruby Ridge MYK Epidemic Eco terrorism Coderpunks Pandemic
X-Ran: Jq>x,;#ciV1`m")^B8E'9p"[OJ6'GW7D^,+g#FaouzsHv:zLwTv`,#JAax?5"tVX+U<\_4
X-Hue: brightcyan
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Thu, 25 Mar 2021 14:28:20 -0400
In-Reply-To: <83wntz9jws.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 22 Mar
 2021 19:29:23 +0200")
Message-ID: <uo4kgzdr5n.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47298
Cc: 47298 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii wrote:

>> From: Glenn Morris <rgm@HIDDEN>
>> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47298; Package emacs. Full text available.

Message received at 47298 <at> debbugs.gnu.org:


Received: (at 47298) by debbugs.gnu.org; 22 Mar 2021 17:29:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 22 13:29:28 2021
Received: from localhost ([127.0.0.1]:58467 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lOOMq-00008j-Cs
	for submit <at> debbugs.gnu.org; Mon, 22 Mar 2021 13:29:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50532)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1lOOMo-00008W-PP
 for 47298 <at> debbugs.gnu.org; Mon, 22 Mar 2021 13:29:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35128)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>) id 1lOOMj-00071P-J2
 for 47298 <at> debbugs.gnu.org; Mon, 22 Mar 2021 13:29:21 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2680
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1lOOMh-0003R7-Ef; Mon, 22 Mar 2021 13:29:20 -0400
Date: Mon, 22 Mar 2021 19:29:23 +0200
Message-Id: <83wntz9jws.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
In-Reply-To: <20lfag5rru.fsf@HIDDEN> (message from Glenn Morris on
 Sun, 21 Mar 2021 13:40:53 -0400)
Subject: Re: bug#47298: Emacs creates HOME if it does not exist
References: <20lfag5rru.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47298
Cc: 47298 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Glenn Morris <rgm@HIDDEN>
> 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?  And if we don't create ~/.emacs.d, how can we save user's
customizations?

> One may want to set a non-existent HOME eg for testing.

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

Does anyone else have an opinion on this?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47298; Package emacs. Full text available.

Message received at 47298 <at> debbugs.gnu.org:


Received: (at 47298) by debbugs.gnu.org; 22 Mar 2021 06:58:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 22 02:58:14 2021
Received: from localhost ([127.0.0.1]:55940 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lOEVy-0001Qf-Ac
	for submit <at> debbugs.gnu.org; Mon, 22 Mar 2021 02:58:14 -0400
Received: from stw1.rcdrun.com ([217.170.207.13]:44287)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bugs@HIDDEN>) id 1lOEVv-0001QR-Pc
 for 47298 <at> debbugs.gnu.org; Mon, 22 Mar 2021 02:58:13 -0400
Received: from localhost ([::ffff:41.202.241.53])
 (AUTH: PLAIN securesender, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384)
 by stw1.rcdrun.com with ESMTPSA
 id 000000000001E07F.0000000060583FFC.000034A8; Sun, 21 Mar 2021 23:58:04 -0700
Date: Mon, 22 Mar 2021 09:55:45 +0300
From: Jean Louis <bugs@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#47298: Emacs creates HOME if it does not exist
Message-ID: <YFg/cS4usyvAmJzS@HIDDEN>
References: <20lfag5rru.fsf@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
In-Reply-To: <20lfag5rru.fsf@HIDDEN>
User-Agent: Mutt/2.0.6 (2021-03-06)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47298
Cc: eggert@HIDDEN, 47298 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* Glenn Morris <rgm@HIDDEN> [2021-03-21 20:42]:
> IMO the Emacs 26.3 behaviour is correct, and Emacs should not be
> creating HOME if it does not exist. One may want to set a non-existent
> HOME eg for testing.

Warning is better as it gives control to user. Yet in regards to
testing with non-existent Emacs directory .emacs.d do you think would
there be some difference if an empty directory is created by Emacs
compared to no directory at all?






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47298; Package emacs. Full text available.

Message received at 47298 <at> debbugs.gnu.org:


Received: (at 47298) by debbugs.gnu.org; 21 Mar 2021 19:03:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 21 15:03:19 2021
Received: from localhost ([127.0.0.1]:55508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lO3M7-0007C6-FM
	for submit <at> debbugs.gnu.org; Sun, 21 Mar 2021 15:03:19 -0400
Received: from mail-out.m-online.net ([212.18.0.9]:39041)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <whitebox@HIDDEN>) id 1lO3M5-0007Bx-GO
 for 47298 <at> debbugs.gnu.org; Sun, 21 Mar 2021 15:03:18 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4F3Rq76yT0z1qs3T;
 Sun, 21 Mar 2021 20:03:14 +0100 (CET)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.70])
 by mail.m-online.net (Postfix) with ESMTP id 4F3Rq645V1z1qrxy;
 Sun, 21 Mar 2021 20:03:14 +0100 (CET)
X-Virus-Scanned: amavisd-new at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,
 port 10024)
 with ESMTP id 2lvtJ7tRDfgV; Sun, 21 Mar 2021 20:03:13 +0100 (CET)
X-Auth-Info: y4pQqOrBmLvBa6C0lsH7ie7NqTR2jDX2hnse+JAqrj8kkMPnoWwx87iz4FmoMN69
Received: from igel.home (ppp-46-244-177-77.dynamic.mnet-online.de
 [46.244.177.77])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Sun, 21 Mar 2021 20:03:13 +0100 (CET)
Received: by igel.home (Postfix, from userid 1000)
 id 603FF2C325B; Sun, 21 Mar 2021 20:03:12 +0100 (CET)
From: Andreas Schwab <schwab@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#47298: Emacs creates HOME if it does not exist
References: <20lfag5rru.fsf@HIDDEN>
X-Yow: YOW!!  Up ahead!  It's a DONUT HUT!!
Date: Sun, 21 Mar 2021 20:03:12 +0100
In-Reply-To: <20lfag5rru.fsf@HIDDEN> (Glenn Morris's message of
 "Sun, 21 Mar 2021 13:40:53 -0400")
Message-ID: <87zgywqqhb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 47298
Cc: eggert@HIDDEN, 47298 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.5 (-)

On Mär 21 2021, Glenn Morris wrote:

> One may want to set a non-existent HOME eg for testing.

It is probably better to use an existing, but write-protected directory.

Andreas.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47298; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Mar 2021 17:41:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 21 13:41:05 2021
Received: from localhost ([127.0.0.1]:55429 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lO24X-0000yc-Du
	for submit <at> debbugs.gnu.org; Sun, 21 Mar 2021 13:41:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49208)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rgm@HIDDEN>) id 1lO24W-0000y2-FY
 for submit <at> debbugs.gnu.org; Sun, 21 Mar 2021 13:41:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42681)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rgm@HIDDEN>) id 1lO24R-0007td-7Z
 for submit <at> debbugs.gnu.org; Sun, 21 Mar 2021 13:40:59 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1lO24L-0003hA-HS; Sun, 21 Mar 2021 13:40:55 -0400
From: Glenn Morris <rgm@HIDDEN>
To: submit <at> debbugs.gnu.org
Subject: Emacs creates HOME if it does not exist
X-Spook: rs9512c covert video JFK dictionary MD5 NCCS COS DNDO
X-Ran: o|&s$|X"OBS;^LrFx(fpw~vS4}<\aI5!Q?(|>KE!`c'&~!c'aLM$cwU]7}Y-n_D~uKxs2$
X-Hue: blue
X-Debbugs-No-Ack: yes
X-Debbugs-CC: <eggert@HIDDEN
X-Attribution: GM
Date: Sun, 21 Mar 2021 13:40:53 -0400
Message-ID: <20lfag5rru.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Package: emacs
Version: 27.1
Severity: minor

Assuming /tmp/foo does not exist:

HOME=/tmp/foo emacs-26.3

Emacs starts, but displays a warning:
  
  Warning (initialization): Unable to create `user-emacs-directory' (~/.emacs.d/).
  Any data that would normally be written there may be lost!
  If you never want to see this message again,
  customize the variable `user-emacs-directory-warning'.
  Error (initialization): User someuser has no home directory


With Emacs 27.1, HOME is silently created.
(Only interactively; this does not happen in batch mode.)

I assume a4144af909, which added the PARENTS argument to the
make-directory call in locate-user-emacs-file, causes this.

IMO the Emacs 26.3 behaviour is correct, and Emacs should not be
creating HOME if it does not exist. One may want to set a non-existent
HOME eg for testing.




Report forwarded to eggert@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#47298; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 25 Jun 2022 15:30:01 UTC

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