TLDR:
I fixed this by creating an environment variable called HOME
that pointed to my home directory (for me it was C:\Users\kuwze
) which contained my .emacs.d
folder.
The steps to figure this out:
Using C-h i g and selecting
- Emacs W32 FAQ: (efaq-w32). FAQs about Emacs on MS Windows.
I was able to find this useful information:
3.5 Where do I put my init file?
On Windows, the ‘.emacs’ file may be called ‘_emacs’ for backward
compatibility with DOS and FAT filesystems where filenames could not
start with a dot. Some users prefer to continue using such a name due
to historical problems various Windows tools had in the past with file
names that begin with a dot. In Emacs 22 and later, the init file may
also be called ‘.emacs.d/init.el’. Many of the other files that are
created by lisp packages are now stored in the ‘.emacs.d’ directory
too, so this keeps all your Emacs related files in one place.
All the files mentioned above should go in your ‘HOME’ directory.
The ‘HOME’ directory is determined by following the steps below:
- If the environment variable ‘HOME’ is set, use the directory it
indicates.
- If the registry entry ‘HKCU\SOFTWARE\GNU\Emacs\HOME’ is set, use
the directory it indicates.
- If the registry entry ‘HKLM\SOFTWARE\GNU\Emacs\HOME’ is set, use
the directory it indicates. Not recommended, as it results in
users sharing the same HOME directory.
- If ‘C:.emacs’ exists, then use ‘C:/’. This is for backward
compatibility, as previous versions defaulted to ‘C:/’ if ‘HOME’
was not set.
Use the user’s AppData directory, usually a directory called
‘AppData’ under the user’s profile directory, the location of which
varies according to Windows version and whether the computer is
part of a domain.
Within Emacs, <~> at the beginning of a file name is expanded to
your ‘HOME’ directory, so you can always find your ‘.emacs’ file by
typing the command ‘C-x C-f ~/.emacs’.