What is the startup sequence for Emacs?

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

What are these files / directories for? What is the sequence of starting emacs? Is there any way to make emacs not read ~ / .emacs.d?

+13
emacs
Jul 28 '10 at 0:59
source share
4 answers

emacs -q or emacs --no-init-file will cause emacs not to read the ~ / .emacs file. It should not read ~ / .emacs.d if there is a ~ / .emacs file. If the ~ / .emacs file is missing, it will read ~ / .emacs.d / init.el. See the emacs wiki for more information.

Refer to the elisp manual for startup information.

+16
Jul 28 '10 at 1:08
source share

The procedure for starting Emacs is described in detail here . The emacs lisp manual comes with emacs, so you should consult with it and not with the appropriate manual on the Internet, because the first will exactly match your version of emacs. To visit him, type emacs Ch im elisp RET m Starting Up RET .

+4
Oct. 16 '12 at 19:14
source share

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

This is the result of 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 is read 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 Ch Ca.

Again, it is not readable from ~ / .emacs.d / init.el, but the starting point is if ~ / .emacs.d / package.el.

+3
Jul 28 '10 at 19:11
source share

if there is a .emacs file, emacs do not load the ~ / .emacs.d / init.el file, if you want to use the .emacs.d / init.el file, you must delete ~ / .emacs file

0
Jul 18 '13 at 3:12
source share



All Articles