pauby · 2022-01-23 21:08
I've set the HOME key in the registry at `HKCU\SOFTWARE\GNU\Emacs\`. This worked in 27.2. After upgrading to 28.0.50 the HOME environment variable is used and the value set in the registry is now ignored.
Is this just me, or has anybody else come across this?
mplscorwin · 2022-01-24 01:28
If I'm reading the docs\[1\] correctly, the HOME env var is preferred when it is defined. Are you saying that, without HOME set emacs ignores the registry key? That smells like a bug if so.
Can you reproduce with a more recent (28.0.91) build? (Am I wrong that 28.0.50 is from before the emacs-28 branch became the release branch?)
FWIW: I have HOME set in my windows environment settings and that's been working well since I set it up while using Emacs 26.1 (including with Emacs 27.1/2 and self-build versions of emacs-28/28.0.91 and a fairly recent build of the main branch).
\[1\] https://www.gnu.org/software/emacs/manual/html\_node/efaq-w32/Location-of-init-file.html
pauby · 2022-01-24 10:40
> If I'm reading the docs[1] correctly, the HOME env var is preferred when it is defined. Are you saying that, without HOME set emacs ignores the registry key?
For 28.0.50 it does. It didn't on either 27.1 or 27.2 (I can't remember which). I know it didn't because I setup my `init.el` file in a different directory and it was being used.
> Can you reproduce with a more recent (28.0.91) build? (Am I wrong that 28.0.50 is from before the emacs-28 branch became the release branch?)
I haven't seen a pre-compiled binary for 28.0.91. I thought 28.0.50 was the latest. Can you point me to it?
> FWIW: I have HOME set in my windows environment settings and that's been working well since I set it up while using Emacs 26.1 (including with Emacs 27.1/2 and self-build versions of emacs-28/28.0.91 and a fairly recent build of the main branch).
The problem with HOME in Windows is is'a poor variable to use by default. If the instructions are correct now, in that HOME takes priority then it makes it impossible to use a different location for Emacs. HOME is always set by Windows to point to your home folder (c:\users\<username>). If I change it just for Emacs I will break many things.
A much better way of doing this without messing around with the registry is use EMACS_HOME and if that doesn't exist fall back to HOME.
Will go and check if 27.2 works and update this.
UPDATE: 27.2 and 27.1 don't work with this either. So I'm incredibly confused. How on earth **WAS** it working?!?!?
alanthird · 2022-01-24 13:22
Does XDG\_CONFIG\_HOME work on Windows? You could maybe set that and put your init.el there?
pauby · 2022-01-24 17:27
Just tried that and it didn't work :(