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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 26 Jul 2024 09:16:12 +0300

> From: Sean Devlin <[email-masked]>
> Date: Thu, 25 Jul 2024 15:59:45 -0400
> Cc: [email-masked]
> 
> 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.