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>; dated Sun, 21 Mar 2021 17:42:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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: Mon, 22 Mar 2021 17:30:02 UTC

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