How to config gnu emacs on Mac OS X

user2056639 picture user2056639 · Mar 6, 2013 · Viewed 7.8k times · Source

I use gnu emacs on Mac OS X, but I can't find the .emacs.

And I create ~\.emacs, but it doesn't work. How can I config my emacs?

Answer

Chris Barrett picture Chris Barrett · Mar 7, 2013

The recommended practice these days is to create a folder called .emacs.d, then put a file called init.el in there. Emacs will load this file on startup.

cd
mkdir .emacs.d
cd .emacs.d
touch init.el

This .emacs.d folder is where Emacs will place temporary files, packages, etc, that you would not want polluting your home folder.

If you're new to emacs and just want to get up-and-running, consider downloading one of the existing emacs configurations on github and tweaking that: