memius
memius

Reputation: 4125

Reload configurations without restarting Emacs

How do I load the edited .emacs file without restarting Emacs?

Upvotes: 99

Views: 32139

Answers (9)

Joe
Joe

Reputation: 1045

I use and recommend restart-emacs package on melpa

Upvotes: 2

tkf
tkf

Reputation: 1070

In the *scratch* buffer, type:

(load-file user-init-file)

Then press C-x C-e to evaluate the expression.

Upvotes: 13

Shantanu
Shantanu

Reputation: 514

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.

Upvotes: 2

Geremia
Geremia

Reputation: 5692

M-x load-file ENTER
~/.emacs
ENTER

(source)

Upvotes: 6

WisdomFusion
WisdomFusion

Reputation: 510

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

Upvotes: 7

KeithB
KeithB

Reputation: 17067

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.

Upvotes: 27

Mario F
Mario F

Reputation: 47297

M-x load-file and then choose the .emacs file should also work

Upvotes: 8

Mark Roddy
Mark Roddy

Reputation: 27986

Open the .emacs file, select its contents and hit C-x,C-e

Upvotes: 5

Martin Cote
Martin Cote

Reputation: 29892

M-x eval-buffer

Upvotes: 139

Related Questions