Here are my settings:
- Windows 10 64bit
- GNU Emacs 25.2.1 (x86_64-w64-mingw32) of 2017-04-24
I want to keep the
HOME environment variable to by user folder
C:/User/chanyoungs for other programs but it seems like emacs needs the
HOME to be at the emacs root folder which is
C:/User/chanyoungs/Documents/Programming/emacs/. So my solution is to set the system environment variable as my user folder and have a .emacs file redirecting the environments in emacs as below:
(setq user-init-file "C:/Users/chanyoungs/Documents/Programming/emacs/.emacs.d/init.el")
(setq user-emacs-directory "C:/Users/chanyoungs/Documents/Programming/emacs/.emacs.d/")
(setq default-directory "C:/Users/chanyoungs/Documents/Programming/")
(setenv "HOME" "C:/Users/chanyoungs/Documents/Programming/emacs/")
Then when I run emacs, it seems like
init.el is ran but everything gets messed up. I found out that emacs thinks
I also did some tests to find out that I think basically emacs is unable to access any further than
C:/Users/ i.e. it cannot access
C:/Users/chanyoungs which is why it is unable to set
HOME environment correctly.
So I tried placing the whole emacs folder in
C:/ and changed the
.emacs file to point everything to
C:/ and this works.
The problem with this is I can no longer open any files in my documents which is a problem. If I keep the emacs folder in documents folder and set the Windows system environment
HOME as the emacs folder then this does solve the emacs problem. It seems like emacs is able to access document folders if it's already in the document folder if that makes sense. But ideally, I want to keep the system
HOME as my user root folder for other programs.
The strangest thing to all this is that it worked perfectly fine 2 days ago when I first set it up this way but now it's causing all these problems even though I didn't change any emacs settings since.
Any suggestions would be much appreciated. Thanks