How do I load the edited .emacs
file without restarting Emacs?
Asked
Active
Viewed 3.0k times
95

bfavaretto
- 71,580
- 16
- 111
- 150

memius
- 4,045
- 5
- 26
- 25
9 Answers
136
M-x eval-buffer

Martin Cote
- 28,864
- 15
- 75
- 99
-
17This works only if you were editing the ".emacs" file itself. – VasiliNovikov Sep 25 '14 at 12:46
-
1This does not seem to work when changing the font size. – Chris Stryczynski Nov 12 '18 at 20:58
26
I usually use M-x load-file. But be aware that some initialization is only done the first time through. Things like libraries that set their defaults when loaded, but don't get reloaded the second time through. Its always a good idea to start up emacs from scratch as a final check that everything works ok.

KeithB
- 16,577
- 3
- 41
- 45
6
M-x load-file ~/.emacs
eval-buffer when the .emacs file is opened
eval-region when you want apply selected lines
C-x C-e evaluates the preceding expression

WisdomFusion
- 440
- 6
- 12
-
`C-x C-e` evaluates the preceding *expression*, which may span multiple lines. – phils Aug 26 '12 at 00:57
1
you can use C-x C-e
which will evaluate an s-expression. Make sure the cursor is at the last parenthesis of the elisp code.

Martin Josefsson
- 953
- 12
- 24

Shantanu
- 504
- 5
- 15