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

From: Robert Pluim <[email-masked]>
Date: Fri, 26 Jul 2024 14:14:27 +0200

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

Robert
--