Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I load changes to my .emacs without rebooting Emacs? [duplicate]

Tags:

How can I get Emacs to reload all my definitions that I have updated in .emacs without restarting Emacs?

like image 242
yazz.com Avatar asked Apr 05 '10 19:04

yazz.com


People also ask

How do I reload Spacemacs config?

Another way to do this is press space twice ( SPC SPC ) which brings you into the emacs command mode. Then type: sync-config and press Enter which will execute the dotspacemacs/sync-configuration-layers command and reload your config.

How do I restart Emacs?

There is no way to restart an Emacs session once you have killed it. You can, however, arrange for Emacs to record certain session information, such as which files are visited, when you kill it, so that the next time you restart Emacs it will try to visit the same files and so on.


1 Answers

You can use the command load-file (M-x load-file, then press return twice to accept the default filename, which is the current file being edited).

You can also just move the point to the end of any sexp and press C-xC-e to execute just that sexp. Usually it's not necessary to reload the whole file if you're just changing a line or two.

like image 71
Bryan Oakley Avatar answered Sep 18 '22 13:09

Bryan Oakley