GNU bug report logs - #72294
29.2; Emacs --init-directory=... puts user-init-file elsewhere

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; Reported by: Sean Devlin <spd@HIDDEN>; Done: Daan Ro <daanturo@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 72294) by debbugs.gnu.org; 26 Jul 2024 10:34:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 26 06:34:32 2024
Received: from localhost ([127.0.0.1]:38841 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sXIHQ-0003ls-8o
	for submit <at> debbugs.gnu.org; Fri, 26 Jul 2024 06:34:32 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53772)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sXIHM-0003lZ-IN
 for 72294 <at> debbugs.gnu.org; Fri, 26 Jul 2024 06:34:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sXIH7-0006JV-Ot; Fri, 26 Jul 2024 06:34:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=Q54b2k2+7ROpP8EjlylJUT7ceXiqFXh3cpOYAAL9A4s=; b=nnodQVPnEF6wyHGi+RR0
 pAQotKzT7bjleHiZF/eTdEq1wQS6mGLSL4LG35+c+9LJxz+qOBPLRLbn9+vs3sb3tVKb6jRTBaIbR
 U8KyNmqEKmtx4eItoEExh+LI1OljmwmXDPdqwcoHWwQUAJBCIAmYyUxRdCZdwm57ru+y1Bem9d/DD
 s5aH+Gb648E/HBDpSJH3QitcB/3SaxBHB4i9t41ahp6peANALqZg98YhJbf58E2Ed3Uq3Mk5qxTtI
 EJ8wZ7ILUjfSJChJ232LsZIFWhfRk25q7YsNdTs3qF0A2bmje6y5ldAgm0BQVkZcXoE0IfdLqL2U0
 DEnrg7B5GcKuMA==;
Date: Fri, 26 Jul 2024 13:34:07 +0300
Message-Id: <86v80s30io.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
In-Reply-To: <87wml87k7u.fsf@HIDDEN> (message from Robert Pluim on Fri, 26
 Jul 2024 08:15:01 +0200)
Subject: Re: bug#72294: 29.2; Emacs --init-directory=... puts user-init-file
 elsewhere
References: <5F9F4A78-8D6D-43B9-9304-641D54AF472E@HIDDEN>
 <868qxp47xs.fsf@HIDDEN>
 <8E3F46B7-A584-44FE-B3D7-A6B1D645B4D7@HIDDEN>
 <87wml87k7u.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72294
Cc: spd@HIDDEN, 72294 <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 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  72294 <at> debbugs.gnu.org
> Date: Fri, 26 Jul 2024 08:15:01 +0200
> 
> >>>>> On Thu, 25 Jul 2024 15:59:45 -0400, Sean Devlin <spd@HIDDEN> said:
> 
> The emacs info file says
> 
>     ‘--init-directory’
>          Specify the directory to use when looking for the Emacs init files.
> 
> and '.emacs' is an Emacs init file, so I guess the confusion is
> understandable. Maybe we should add "(except '.emacs')" to that
> statement.

That would be inaccurate, AFAIU.  If the .emacs file is there, it will
be used from that directory.




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

Message received at 72294-done <at> debbugs.gnu.org:


Received: (at 72294-done) by debbugs.gnu.org; 26 Jul 2024 06:16:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 26 02:16:35 2024
Received: from localhost ([127.0.0.1]:38581 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sXEFn-00032l-1j
	for submit <at> debbugs.gnu.org; Fri, 26 Jul 2024 02:16:35 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37148)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sXEFk-00032Y-Oo
 for 72294-done <at> debbugs.gnu.org; Fri, 26 Jul 2024 02:16:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sXEFU-0000HA-9U; Fri, 26 Jul 2024 02:16:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=1rcBE4inIx+r4jXoIschKP0hfKaRxMaHKiU220xZ91g=; b=NHpgUS6IzyzC
 5N+VBkNw0hGHVg0FLN5Qt4Sxl1rit4kFNeg2RMK4xjQ2lw/w8eHKJY/iwS/FDy6NIF16clASv5ldc
 l+tmSaJdWS78S6H5eFWPDvYpKvenBg6esGVLUxfWefQMR+u96q3/nmXvRoJonvzsXdkdNb5I//YE0
 n4djJodU3TfxazuH6rTuCCVIwFqNik+be22DMJpv4uq6CyqL5urZl/U1lMlE8pqb2hYI2JMz8g4/F
 boEGSXRSPMFdqEUN/kRKw2dcz5yQuTrkBDWZ5tXn+/2+eoHhbt2NSJTHfRfgR6/1+9Vs2bZ+rK2QM
 jP6aQExIq55CkUSHpJf98A==;
Date: Fri, 26 Jul 2024 09:16:12 +0300
Message-Id: <86wml83cgj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sean Devlin <spd@HIDDEN>
In-Reply-To: <8E3F46B7-A584-44FE-B3D7-A6B1D645B4D7@HIDDEN> (message
 from Sean Devlin on Thu, 25 Jul 2024 15:59:45 -0400)
Subject: Re: bug#72294: 29.2; Emacs --init-directory=... puts user-init-file
 elsewhere
References: <5F9F4A78-8D6D-43B9-9304-641D54AF472E@HIDDEN>
 <868qxp47xs.fsf@HIDDEN> <8E3F46B7-A584-44FE-B3D7-A6B1D645B4D7@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72294-done
Cc: 72294-done <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 (---)

> From: Sean Devlin <spd@HIDDEN>
> Date: Thu, 25 Jul 2024 15:59:45 -0400
> Cc: 72294 <at> debbugs.gnu.org
> 
> Hi,
> 
> > I don't think this is a bug.
> 
> Fair enough.
> 
> > May I ask why you needed to use this option?  It should not be
> > generally needed.
> 
> Lately, I run Emacs from the emacs-30 branch with some local tweaks. I
> found a bug in Org, and I was trying to reproduce it in a stable version
> of Emacs with default configuration. The bug is in Org 9.7+, which is
> newer than what ships in Emacs 29.
> 
> Since I knew I would need to install a package, I checked the manual for
> the command-line flags to specify the user-emacs-directory, and I found
> the --init-directory option. I opened an instance of Emacs 29.2 with
> --init-directory=/tmp/bug, and I installed Org via ELPA.
> 
> Then, for an unrelated task, I opened an instance of my main Emacs
> installation, and I was surprised to see it load without any of my
> configuration. I discovered the Emacs 29 instance had written a file to
> ~/.emacs, shadowing my own configuration in ~/.emacs.d/init.el. That it
> wrote the user-init-file outside the user-emacs-directory I specified
> was surprising to me.

Thanks, I used this to improve the documentation of --init-directory
on the emacs-30 branch and make it more accurate, and I'm therefore
closing this bug.




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

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


Received: (at 72294) by debbugs.gnu.org; 26 Jul 2024 06:16:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 26 02:16:21 2024
Received: from localhost ([127.0.0.1]:38577 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sXEFY-00032K-JF
	for submit <at> debbugs.gnu.org; Fri, 26 Jul 2024 02:16:20 -0400
Received: from mail-wm1-f42.google.com ([209.85.128.42]:49429)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1sXEFW-00031p-7L
 for 72294 <at> debbugs.gnu.org; Fri, 26 Jul 2024 02:16:19 -0400
Received: by mail-wm1-f42.google.com with SMTP id
 5b1f17b1804b1-42802de6f59so12103945e9.3
 for <72294 <at> debbugs.gnu.org>; Thu, 25 Jul 2024 23:16:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1721974504; x=1722579304; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id
 :reply-to; bh=V4obHdcEn6lcDLRr/TR6PaJ8axiNCqiMp7GxMABV1rY=;
 b=GO9AOw6pw+vmnxZCkVSFpFjRfHm1QQ+fwkRAObSEDBvaVukAje757YhVparUUCB+Y4
 qo5g7Unuk5mWGFgB+5jwe/sI16ILCVMt5CukVX7eCR2tiQEpEfcxjGYI5ezDeBQv7eay
 Oq8bWMuFJiDZ9LqwAcjz7lPA/BsXjU8C2l6nFE6Uv3B8EkflQ4tpbBtvHL24H9uhq9id
 0ZMcGgO5yDb2+yVyzRAuTOexsGJ/tWWhsOHjeKnSSzLJf59vy5GV09yqvLoPtF4PqXx6
 do9DLcAXxgVmle6fgZznO8KEJUmxQEt70i6aUAHmx1p6YuwBL1y8Wtrv4caPfqlzwDQU
 KvlQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1721974504; x=1722579304;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=V4obHdcEn6lcDLRr/TR6PaJ8axiNCqiMp7GxMABV1rY=;
 b=WbnktyI3SCmGYjTIjmrC3+tr7KiM3loX3s34bkEp7YCP+69yULxgtKeTWZY3zoUdQ9
 BRYDp8lHpJ4ByfzMgvjqH+R3iyluuAUdgJve5FxSPrls4PSXnfN3Jfq2tN7fTXYr2XkX
 vv/eeAQIRVIqcx67A1VeHWyKftCG1AnT7s7zEPZwBWX9dQWGmiUECWldValm/BQLzRKl
 zbfsNkC1n/NBzLQkL9+/mKfMr6c9ylVa2M+3ZZYARt2aNgqLhXL13AwtjGuymQ9Fv9Ss
 TPNUXY0kp1tJasbZrGPVA3/Skte7g41o4BYmCcd+0oL7gTHDGXSWDrHOFtwKHiOo/iNm
 W7Ng==
X-Forwarded-Encrypted: i=1;
 AJvYcCWkvFgIU+2BfojAuZSB3BPhdNgchsFB5v2AHEUTl3wR7sdXoZoHxhviDSExHS8u2YQ845UCbG9PQ/7s6oWOUPPwfu0AavQ=
X-Gm-Message-State: AOJu0YxoYksSrw3mXX4Q0IUkZe/P/sQAJ9qe7yRrQSZ0UBGEudpwHy5Q
 k6aX1Dx00xxrrucEI3Yd41n8ClTanWhJ2WuX81WFvGV82vpH4kuVzLjW+g==
X-Google-Smtp-Source: AGHT+IEDF0g0GS06pKNIL0g+jsYcdSZsIvuJihnENqw7r0sQPbtP45OU2gKpNBgSa7p2rt8pZZEWwQ==
X-Received: by 2002:adf:e787:0:b0:367:9d2c:9602 with SMTP id
 ffacd0b85a97d-36b31b4cbc5mr3614815f8f.49.1721974503552; 
 Thu, 25 Jul 2024 23:15:03 -0700 (PDT)
Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-36b3686e07csm4066311f8f.111.2024.07.25.23.15.02
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 Jul 2024 23:15:02 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Sean Devlin <spd@HIDDEN>
Subject: Re: bug#72294: 29.2; Emacs --init-directory=... puts user-init-file
 elsewhere
In-Reply-To: <8E3F46B7-A584-44FE-B3D7-A6B1D645B4D7@HIDDEN> (Sean
 Devlin's message of "Thu, 25 Jul 2024 15:59:45 -0400")
References: <5F9F4A78-8D6D-43B9-9304-641D54AF472E@HIDDEN>
 <868qxp47xs.fsf@HIDDEN>
 <8E3F46B7-A584-44FE-B3D7-A6B1D645B4D7@HIDDEN>
Date: Fri, 26 Jul 2024 08:15:01 +0200
Message-ID: <87wml87k7u.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 72294
Cc: Eli Zaretskii <eliz@HIDDEN>, 72294 <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 (-)

>>>>> On Thu, 25 Jul 2024 15:59:45 -0400, Sean Devlin <spd@HIDDEN> s=
aid:

    Sean> Hi,
    >> I don't think this is a bug.

    Sean> Fair enough.

    >> May I ask why you needed to use this option?  It should not be
    >> generally needed.

    Sean> Lately, I run Emacs from the emacs-30 branch with some local twea=
ks. I
    Sean> found a bug in Org, and I was trying to reproduce it in a stable =
version
    Sean> of Emacs with default configuration. The bug is in Org 9.7+, whic=
h is
    Sean> newer than what ships in Emacs 29.

    Sean> Since I knew I would need to install a package, I checked the man=
ual for
    Sean> the command-line flags to specify the user-emacs-directory, and I=
 found
    Sean> the --init-directory option. I opened an instance of Emacs 29.2 w=
ith
    Sean> --init-directory=3D/tmp/bug, and I installed Org via ELPA.

The emacs info file says

    =E2=80=98--init-directory=E2=80=99
         Specify the directory to use when looking for the Emacs init files.

and '.emacs' is an Emacs init file, so I guess the confusion is
understandable. Maybe we should add "(except '.emacs')" to that
statement.

    Sean> Then, for an unrelated task, I opened an instance of my main Emacs
    Sean> installation, and I was surprised to see it load without any of my
    Sean> configuration. I discovered the Emacs 29 instance had written a f=
ile to
    Sean> ~/.emacs, shadowing my own configuration in ~/.emacs.d/init.el. T=
hat it
    Sean> wrote the user-init-file outside the user-emacs-directory I speci=
fied
    Sean> was surprising to me.

    HOME=3D/tmp/emacs emacs

is how I do that kind of testing.

Robert
--=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#72294; Package emacs. Full text available.
bug closed, send any further explanations to 72294 <at> debbugs.gnu.org and Sean Devlin <spd@HIDDEN> Request was from Daan Ro <daanturo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 72294) by debbugs.gnu.org; 25 Jul 2024 20:01:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 25 16:01:12 2024
Received: from localhost ([127.0.0.1]:37847 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sX4eF-0000S8-PG
	for submit <at> debbugs.gnu.org; Thu, 25 Jul 2024 16:01:12 -0400
Received: from mail-qt1-f172.google.com ([209.85.160.172]:46409)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spd@HIDDEN>) id 1sX4eC-0000Rt-TN
 for 72294 <at> debbugs.gnu.org; Thu, 25 Jul 2024 16:01:10 -0400
Received: by mail-qt1-f172.google.com with SMTP id
 d75a77b69052e-44930ea05b8so9115961cf.1
 for <72294 <at> debbugs.gnu.org>; Thu, 25 Jul 2024 13:01:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=toadstyle-org.20230601.gappssmtp.com; s=20230601; t=1721937595; x=1722542395;
 darn=debbugs.gnu.org; 
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=IdZcnHaYPiPiUnrJ/5ttU8ySRWckyh1ek81fmHn88/U=;
 b=0yaS9llcbsQ65Q37M6CZu4BFW3nU7RMJN613jrMwdAHaPthvtvPMPvhc93m+eAZ3VQ
 2n0t6TKIITjiR2FAdM9I1nxvlfZ39LXXPWMGgYDnrx3SppScQSEpQiaOjlEBwLHUbPWZ
 Hit1YF4qLEUO4so7lmoEk1X2rXgbY4yEhhUpQkLfyALm58TwHclRc6Czz6d07aMeDjU5
 HlrvR9E2fOzW4Mo8IGAnhZckQsx1TP2UQlih2jj85mXpAwSeCGFSJwqhFRAvA5jsZbCF
 cwYittizd3CfQlRGpBpHzH8JbOjQbzxRx7sDTJI6XQqHK0yIM1m4/18LZT54iz8FO0Dw
 ZS7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1721937595; x=1722542395;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=IdZcnHaYPiPiUnrJ/5ttU8ySRWckyh1ek81fmHn88/U=;
 b=nYQYz1vqVDFUVTy5EPcgmKCG2PWcvpza0P0A06yc3pmbHj6If01qFFyvbuu9l+OyXn
 cP3/+YCXKI7eFBqOwC0zvr60dHZOqntJuQuTyj0tbcFtvx/xv07/Nvth6Uq2tUaLNzDN
 1lK/iDMxT9u3fq3EoaSFOWHpvz1lYDEkTb3X7AK4t38MDTX/sLe/wuhTZ4buwHnQUib5
 Vqfzxc/JkEREZnBu70nCwShbgEAZSe4R1liPNbCxsCQ8G/ZR0MV5O+3LJ5d1y0+OUYPg
 SVcrRD2iq8Sn/BCNqVLeXlGkIHAETZZ7upzacBiSJdC1OuhLQkzN3EXM5mYBwzoOsXp+
 YV5Q==
X-Gm-Message-State: AOJu0YwKoFuDv1bh7DN1RhYrAffiTRykiAoAi74Vk8LeOYXAfiRkcaLX
 JP64uBCAelYuLJHUsJWdY2dBIee485ZLLpKLOPgkXGhSXek+ezaIXULbsqhDpLVaIbCyD7Relcd
 9
X-Google-Smtp-Source: AGHT+IGFUdA6I0ExAC76R8v04T0zGu4qBFDYVmB4yUHiMUTb4fh9LvMWPIV1EbbeVyp7jrIVU3eeZQ==
X-Received: by 2002:a05:622a:314:b0:44f:f22c:f5a9 with SMTP id
 d75a77b69052e-44ff22cfb4bmr10708751cf.57.1721937595184; 
 Thu, 25 Jul 2024 12:59:55 -0700 (PDT)
Received: from smtpclient.apple ([70.107.172.48])
 by smtp.gmail.com with ESMTPSA id
 d75a77b69052e-44fe814652asm8967591cf.27.2024.07.25.12.59.54
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 25 Jul 2024 12:59:54 -0700 (PDT)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3813.100.4\))
Subject: Re: bug#72294: 29.2; Emacs --init-directory=... puts user-init-file
 elsewhere
From: Sean Devlin <spd@HIDDEN>
In-Reply-To: <868qxp47xs.fsf@HIDDEN>
Date: Thu, 25 Jul 2024 15:59:45 -0400
Content-Transfer-Encoding: 7bit
Message-Id: <8E3F46B7-A584-44FE-B3D7-A6B1D645B4D7@HIDDEN>
References: <5F9F4A78-8D6D-43B9-9304-641D54AF472E@HIDDEN>
 <868qxp47xs.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3813.100.4)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 72294
Cc: 72294 <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 (-)

Hi,

> I don't think this is a bug.

Fair enough.

> May I ask why you needed to use this option?  It should not be
> generally needed.

Lately, I run Emacs from the emacs-30 branch with some local tweaks. I
found a bug in Org, and I was trying to reproduce it in a stable version
of Emacs with default configuration. The bug is in Org 9.7+, which is
newer than what ships in Emacs 29.

Since I knew I would need to install a package, I checked the manual for
the command-line flags to specify the user-emacs-directory, and I found
the --init-directory option. I opened an instance of Emacs 29.2 with
--init-directory=/tmp/bug, and I installed Org via ELPA.

Then, for an unrelated task, I opened an instance of my main Emacs
installation, and I was surprised to see it load without any of my
configuration. I discovered the Emacs 29 instance had written a file to
~/.emacs, shadowing my own configuration in ~/.emacs.d/init.el. That it
wrote the user-init-file outside the user-emacs-directory I specified
was surprising to me.





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

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


Received: (at 72294) by debbugs.gnu.org; 25 Jul 2024 18:56:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 25 14:56:38 2024
Received: from localhost ([127.0.0.1]:37770 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sX3dm-0004Ln-FL
	for submit <at> debbugs.gnu.org; Thu, 25 Jul 2024 14:56:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55034)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1sX3dj-0004LV-PC
 for 72294 <at> debbugs.gnu.org; Thu, 25 Jul 2024 14:56:36 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1sX3dU-0003CR-OV; Thu, 25 Jul 2024 14:56:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=/l3ndjMEclmQSnnK3r28aUo6YLxrbZqjHXUq3F2zRo0=; b=X3IGSK2VWmuU
 lB57pOj0JX2KzZa7CD5bCb/qpqOlYKYV8t0TYTwcVD9N2Be7yiRQZIEWKIg56pDh0qeQOa9YyDrBm
 k1DSkY0KFG4XMZ7RDuKBAvHZt7KER73Jjxk5ROJ21MFCQsmyphYkgQGx8fIjRZ/vpsu8sDn7D0mPS
 w0IheWskzNm8KdpJsn3ccQGwrXWYGvjM4BfkaGBxxxjhHEr99x8MUKccrH6hpVScrqeUMJsHIpRIW
 sWMZmJUw3+Zdl+vquTjelmkF6higgrYRo8OkTddAA0i+bUDM1DHi3QCjMQz0Iyac6rQ79Qc0+CICJ
 sx1VlhSAW94cgzmgZn5r8Q==;
Date: Thu, 25 Jul 2024 21:56:15 +0300
Message-Id: <868qxp47xs.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sean Devlin <spd@HIDDEN>
In-Reply-To: <5F9F4A78-8D6D-43B9-9304-641D54AF472E@HIDDEN> (message
 from Sean Devlin on Thu, 25 Jul 2024 12:12:07 -0400)
Subject: Re: bug#72294: 29.2;
 Emacs --init-directory=... puts user-init-file elsewhere
References: <5F9F4A78-8D6D-43B9-9304-641D54AF472E@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 72294
Cc: 72294 <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 (---)

> From: Sean Devlin <spd@HIDDEN>
> Date: Thu, 25 Jul 2024 12:12:07 -0400
> 
> 1. emacs --init-directory=/tmp/emacs
> 2. M-: user-init-file RET
> 
> The user-init-file is ~/.emacs, despite the flag to use /tmp/emacs as
> the init directory.
> 
> Maybe this is intended behavior, but I found it confusing. The manual
> says this about the flag:
> 
> "Specify the directory to use when looking for the Emacs init files."
> 
> I interpreted this to mean all init files, including the user-init-file.

That option sets user-emacs-directory, it doesn't directly affect
user-init-file.

Emacs by default sets user-emacs-directory to the directory where it
actually finds the init file.  This option overrides that.

> A workaround is to create /tmp/emacs/init.el before starting Emacs:
> 
> 1. mkdir -p /tmp/emacs
> 2. touch /tmp/emacs/init.el
> 3. emacs --init-directory=/tmp/emacs

It isn't a workaround, it's how you should do it.

I don't think this is a bug.  The search for init file and the setting
of user-emacs-directory that follows are complex issues, not easily
explained in a few words.

May I ask why you needed to use this option?  It should not be
generally needed.




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

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


Received: (at submit) by debbugs.gnu.org; 25 Jul 2024 16:12:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 25 12:12:32 2024
Received: from localhost ([127.0.0.1]:37660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sX14x-00009l-Ql
	for submit <at> debbugs.gnu.org; Thu, 25 Jul 2024 12:12:32 -0400
Received: from lists.gnu.org ([209.51.188.17]:35630)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spd@HIDDEN>) id 1sX14w-00009Z-9a
 for submit <at> debbugs.gnu.org; Thu, 25 Jul 2024 12:12:30 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spd@HIDDEN>) id 1sX14o-0001tr-Ek
 for bug-gnu-emacs@HIDDEN; Thu, 25 Jul 2024 12:12:22 -0400
Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <spd@HIDDEN>) id 1sX14m-0008Qt-9Y
 for bug-gnu-emacs@HIDDEN; Thu, 25 Jul 2024 12:12:22 -0400
Received: by mail-qt1-x834.google.com with SMTP id
 d75a77b69052e-44feaa08040so3418331cf.2
 for <bug-gnu-emacs@HIDDEN>; Thu, 25 Jul 2024 09:12:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=toadstyle-org.20230601.gappssmtp.com; s=20230601; t=1721923938; x=1722528738;
 darn=gnu.org; 
 h=to:date:message-id:subject:mime-version:content-transfer-encoding
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=h5+J7u/oS8iXRJAAG0uvdhCqJaS+Lzv1sODcbeTCkD0=;
 b=yZdLfgjFlJm/uJkxNYirFoN92m11yUYCm6vpAg2EZ7VK9lPECrnzZcJAV/wi5uZA+X
 cOKFQfB88+t5oCOZklwnxlWspONSEgYR2TWypZjxH9h4/JznCWe7E4bEpx+OBNrAgtTZ
 zQNr5448xt7HuGv35u47mcxxUqiDer/T/Cgy9aLUB+bWxitjIrKzuo+x8XOXoQ2/8Fed
 pHRzZNmgLuenlkRXTuCk9bcI1gl9rxHT0PXDOwtDmYB/+dGbRdCLobYDkmz2wd/2DDj/
 w+f9AaqMuGNFh6uklGUzg+BW9YPD+/AW5XnI4RdXS+uNwm1F0bfIWiIeygKRi6xIHZpW
 IhAQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1721923938; x=1722528738;
 h=to:date:message-id:subject:mime-version:content-transfer-encoding
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=h5+J7u/oS8iXRJAAG0uvdhCqJaS+Lzv1sODcbeTCkD0=;
 b=mimtazV3NMo7ga8yX4meMZNMeID7TzV0m0j5C4BlSeYUsNGNkSYzzwZb3gyeDyyqZ9
 7NFBMQHrAU18CBs9KwioaR6lC8OfQabu6L4BpuCEgGPudnALCsY36FTD2CjcXKyXl1Ae
 pyZl8o4P47JiiQOBjnyJmVGPISW7rfLKFOeELFprg9BTjHLfhaeCOn3t2KyMLEVJPJ0I
 oVSx4ohYPxX6Tz5dlIcrTP5z9TygKg1MIwJEZR7DXnY2D/2i6/T18Dn4ntRaX4T4UU9c
 gUeptI4MFA0j7E55DoRLOFEebb+000p9HA0XjY1r+LKKFYtESJrtpf/HfY6Ga9S5oMNn
 1fXQ==
X-Gm-Message-State: AOJu0YxPJZSVCk05BAYShFRh40R7IifMeBnU6zH8j6abmzZPR6z5t4FN
 +/chn3iJhiIneEfDmYek2jZ2VwX/WSyBzrco2J3JIXyGBisutt4Z2OGxnHSTnv099f+i1E4TUr9
 p
X-Google-Smtp-Source: AGHT+IFzrXkCBbqIsAhYa3lzd+80uZY3D705PulGXBr6ydJmIta23r8cvWQo+6OPZ44HCTkFeHx7wA==
X-Received: by 2002:a05:622a:118d:b0:447:dc38:694a with SMTP id
 d75a77b69052e-44fe91db8d0mr21021311cf.31.1721923938191; 
 Thu, 25 Jul 2024 09:12:18 -0700 (PDT)
Received: from smtpclient.apple ([70.107.172.48])
 by smtp.gmail.com with ESMTPSA id
 d75a77b69052e-44fe8147635sm7536841cf.31.2024.07.25.09.12.17
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 25 Jul 2024 09:12:17 -0700 (PDT)
From: Sean Devlin <spd@HIDDEN>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3813.100.4\))
Subject: 29.2; Emacs --init-directory=... puts user-init-file elsewhere
Message-Id: <5F9F4A78-8D6D-43B9-9304-641D54AF472E@HIDDEN>
Date: Thu, 25 Jul 2024 12:12:07 -0400
To: bug-gnu-emacs@HIDDEN
X-Mailer: Apple Mail (2.3813.100.4)
Received-SPF: pass client-ip=2607:f8b0:4864:20::834;
 envelope-from=spd@HIDDEN; helo=mail-qt1-x834.google.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
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: -2.3 (--)

Hi folks,

Recipe:

1. emacs --init-directory=/tmp/emacs
2. M-: user-init-file RET

The user-init-file is ~/.emacs, despite the flag to use /tmp/emacs as
the init directory.

Maybe this is intended behavior, but I found it confusing. The manual
says this about the flag:

"Specify the directory to use when looking for the Emacs init files."

I interpreted this to mean all init files, including the user-init-file.

A workaround is to create /tmp/emacs/init.el before starting Emacs:

1. mkdir -p /tmp/emacs
2. touch /tmp/emacs/init.el
3. emacs --init-directory=/tmp/emacs

Thanks!

In GNU Emacs 29.2 (build 1, aarch64-apple-darwin21.6.0, NS
appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2024-01-18 built on
armbob.lan
Windowing system distributor 'Apple'
System Description:  macOS

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000
-DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no'

Configured features:
ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER
PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
cl-extra cl-print byte-opt gv bytecomp byte-compile thingatpt help-fns
radix-tree help-mode cl-loaddefs cl-lib rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 53484 8633)
(symbols 48 5930 0)
(strings 32 18349 1801)
(string-bytes 1 515950)
(vectors 16 12602)
(vector-slots 8 182812 16189)
(floats 8 28 22)
(intervals 56 232 1)
(buffers 984 12))




Acknowledgement sent to Sean Devlin <spd@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#72294; 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: Fri, 26 Jul 2024 10:45:01 UTC

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