I am a total emacs newbie. I was following the Master Emacs in one year guide by Chen Bin. Following it, I cloned Steve Purcell's .emacs.d repo.

Now the guide works just fine when I do M-x eval-buffer for my "~/.emacs.d/init.el" file. However, as soon as I restart Emacs, the changes are gone. I have to eval-buffer every time I start emacs. I also checked some websites which explains me to have either .emacs file or init.el file and not both. But every time I delete my .emacs file, Emacs generates it automatically when I restart it.

What am I doing wrong?

  • Do you by any chance have a ~/.emacs or ~/init.el files? These would preclude you from using ~/.emacs.d/init.el as your init file. – wvxvw Apr 13 '15 at 13:14
  • @wvxvw I do have a ~/.emacs file. As I mentioned in my question, when I delete it, it appears automatically when I restart Emacs. In addition to that I do also have ~/.emacs.desktop and ~/.emacs.elc files. – xandfury Apr 13 '15 at 13:33
  • What operating system are you using? How did you install Emacs? What version? – Gilles Apr 13 '15 at 16:08
  • An ~/emacs directory will also interfere. – wdkrnls Apr 13 '15 at 16:11
  • 1
    It was auto-created because it is the default init file. If it hadn't already been "fixed" I'd've suggested renaming ~/.emacs.d/init.el to ~/.emacs and loading the config that way. Now, more importantly, are you using a Mac? If the answer is "no" you should go through that init file you copied and delete all the OS X references. – Ben Apr 15 '15 at 16:09

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.