0

I want to find my init file.. but I cannot, supposedly it must be created? How do I create an init.el file?

Do I just C-X C-F and then type ~/.emacs.d/init.el?

2
  • C-x C-f (lower case x and lower case f) but otherwise yes: that will open a new buffer, you can insert things into it and then save it with C-x C-s. – NickD May 28 at 18:02
  • Sort of... I realize that I need to make it but when I do c-x c-f and then type the location of the new file ~/.emacs.d/init.el it makes a buffer called init... I then paste the text I want to add in there, restart and nothing happens (i am using this to get melpa)... – soylent May 28 at 20:43
0

Yes, that is one of the default locations emacs looks for configuration files. If it does not exist you can create it and emacs will load it the next time it starts.

From the docs

Traditionally, file ~/.emacs is used as the init file, although Emacs also looks at ~/.emacs.el, ~/.emacs.d/init.el, ~/.config/emacs/init.el, or other locations.

https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.