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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 26 Jul 2024 15:03:41 +0300

> From: Robert Pluim <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Fri, 26 Jul 2024 14:00:22 +0200
> 
> >>>>> On Fri, 26 Jul 2024 13:34:07 +0300, Eli Zaretskii <[email-masked]> said:
> 
>     >> From: Robert Pluim <[email-masked]>
>     >> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
>     >> Date: Fri, 26 Jul 2024 08:15:01 +0200
>     >> 
>     >> >>>>> On Thu, 25 Jul 2024 15:59:45 -0400, Sean Devlin <[email-masked]> 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.
> 
>     Eli> That would be inaccurate, AFAIU.  If the .emacs file is there, it will
>     Eli> be used from that directory.
> 
> Thatʼs not what I observe:
> 
> ~/.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'.

Sean said that an existing init file was being used from that
directory.  This contradicts your observations.