When I change any custom configuration file in the .emacs.d/elisp/
directory, I have to quit Emacs and then start it again in order to get my changes applied. Is there any better way?
Asked
Active
Viewed 1.0k times
11

Ribtoks
- 213
- 1
- 2
- 5
-
1https://www.emacswiki.org/emacs/EvaluatingExpressions and https://masteringemacs.org/article/evaluating-elisp-emacs and `M-x load-file` are all good to know. Note that, depending on the code in question, re-evaluating something isn't necessarily the same as if you had started Emacs with the code in that state to begin with. – phils Apr 25 '18 at 10:38
-
1@phils thanks for the links. Yes, that's the problem, "reevaluation isn't always the same as to start over". Is there any way to flush the state and apply configuration? – Ribtoks Apr 25 '18 at 12:44
-
2No there isn't. On a case-by-case basis one can generally determine how to revert specific things, but the only "flush state" option is restarting Emacs (because the "state" in Emacs is everything -- configuration, code, data, buffers, etc; it is all intertwined). – phils Apr 25 '18 at 19:18
-
1If you have a specific example at hand, you could post a new question asking how to deal with that. – phils Apr 25 '18 at 19:20
1 Answers
10
After you have changed you configuration in a .el
file, just reload it with M-x eval-buffer
command. Or use the menu Emacs-Lisp->Evaluate buffer
.

Maxim Kim
- 1,516
- 9
- 17