Emacs Init: Intro
What is Init File
Emacs init file is a file emacs loads when it starts up. It is used to customize emacs.
Emacs init file is also known as “dot emacs file”.
Where is Init File
Can i delete the emacs init file
Yes. (if you don't have anything important you put there.)
Can i delete the emacs init directory
Depends.
You lose all bookmarks you've setup, install packages, cache files, and command history, and opened files history, etc.
You can recreate them.
How to find out if emacs init is loaded?
put this in your Emacs Init File:
(set-background-color "ivory")
If emacs starts with new background color, then it's loaded.
Start Emacs Without Loading Init File
Load Init File Without Restarting Emacs
Once the code is evaluated, effect are immediate.
💡 TIP: some packages, or elisp code, may behave differently when loaded twice. And some snippet of code may not work by simply running it by itself (it may assume some other code has been loaded before or after.).
If you have a problem, restart emacs.
Restart Emacs
Alt+x restart-emacs
(new in Emacs 29 (Released 2023-07))
Reference
Thanks To
- 2017-07-02 much thanks to jcs. http://irreal.org/blog/
- 2011-11-21 Thanks to Ivan Kozik (http://ludios.org/ivank/) for a tip.