Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs init file won't load at start up

I'm trying to run Emacs v22.2 on a Windows 7 computer. However, the init file isn't loaded at start up (loading it manually with M-x load-file works fine).

I've tried using both:

~\.emacs, ~\_emacs 
~\.emacs.d.init.el 

but the problem persists.

Evaluating (insert (getenv "HOME")) returns the expected value.

like image 446
Aerion Avatar asked Oct 14 '25 18:10

Aerion


1 Answers

Depending on how you open emacs in Windows 7, it will look in different places for the .emacs file. If call it from within a shell (in cygwin, Msys, etc) it will look in the $HOME (~) location, if you run it form the installation directory by clicking on the icon, it looks for this file in the %APPDATA% location ( usually C:\Users\your user name\AppData\Roaming ). This can lead you in a merry chase all over the place. I found that it is best to determine where you want the file to be stored, and the create symbolic links ( using windows mklink utility ) to all other possible locations.

like image 155
lcollado Avatar answered Oct 17 '25 12:10

lcollado