tags:

views:

91

answers:

2

I find .emacs, and ~/.emacs.d/init.el.

What those files/directories are for? What's the startup sequence of emacs? Is there any way that makes emacs not to read ~/.emacs.d?

+6  A: 

emacs -q or emacs --no-init-file will cause emacs not to read the ~/.emacs file. It should not try to read the ~/.emacs.d if there is a ~/.emacs file. If there isn't a ~/.emacs file it will read ~/.emacs.d/init.el. See the emacs wiki for more info.

See the elisp manual for info on startup.

deinst
+1  A: 

Based on sanityinc's answer, I did some experiments by adding (message "* MESSAGE *") at the end of ~/.emacs.d/init.el, my personal el file (smcho.el), and .emacs.el, and I opened Messages buffer.

This is the result from Aquamacs.

Loading prestart plugin files ...
... done.
Shell: /bin/bash
Loading `emulate-mac-keyboard-mode': old-style backquotes detected!
Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/Recent Files.el (source)...done
Cleaning up the recentf list...done (0 removed)
27 environment variables imported from login shell (/bin/bash).
Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/auctex.el (source)...done
Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/haskell-mode/haskell-site-file.el (source)...done
Loading plugins ...
Loading /Library/Application Support/Aquamacs Emacs/SLIME/site-start.el (source)...done
Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/site-start.el (source)...done
... done.
***** Hello from .emacs, and I'm with Aquamacs 
***** hello from smcho.el 
Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/customizations.el (source)...done
Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/Preferences.el (source)...done
Mark set
one-buffer-one-frame-mode disabled.
Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/frame-positions.el (source)...done

It reads from .emacs and smcho.el, but not from ~/.emacs.d/init.el. This is from Aqua emacs.

Loading /Users/smcho/.emacs.d/package.el (source)...done
***** Hello from .emacs, and I'm with Aqua emacs
***** hello from smcho.el
For information about GNU Emacs and the GNU system, type C-h C-a.

Again it doesn't read from ~/.emacs.d/init.el, but the starting point if ~/.emacs.d/package.el.

prosseek