Subject: bug#72294: 29.2; Emacs --init-directory=... puts user-init-file elsewhere

From: Sean Devlin <[email-masked]>
Date: Fri, 26 Jul 2024 09:48:11 -0400

> On Jul 26, 2024, at 8:14 AM, Robert Pluim <[email-masked]> wrote:
> 
>>>>>> On Fri, 26 Jul 2024 15:03:41 +0300, Eli Zaretskii <[email-masked]> said:
> 
>>> ~/.emacs:
>>> 
>>> (message "Home dir")
>>> 
>>> /tmp/emacs-30/.emacs:
>>> 
>>> (message "Temp dir")
>>> 
>>> src/emacs --init-directory=/tmp/emacs-30
>>> 
>>> => *Messages* contains "Home dir"
>>> 
>>> So it looks like this option only affects `user-emacs-directory'.
> 
>    Eli> Sean said that an existing init file was being used from that
>    Eli> directory.  This contradicts your observations.
> 
> An existing "init.el" file, if "~/.emacs" does not exist. Not a
> ".emacs" file in the directory specified by
> '--init-directory'. Because --init-directory changes
> `user-emacs-directory’.

Correct, I only tested with a file named init.el, not .emacs.