What to do if I cannot find my emacs init file?

懵懂的女人 提交于 2019-11-26 11:33:18

问题


I am trying to add haskell-mode to emacs by following these instructions:

http://doc.gnu-darwin.org/haskell-mode/installation-guide.html

This involves that I add some code to my ~/.emacs init file. However, my issue is that I cannot locate my emacs init file. I tried using find commands to locate it, as so:

find . -name \"*emacs*\"
find . -name \"~/.emacs\"

However none of these appear to be very successful, as I get either too many results, or no results.

So, given my situation, since I cannot locate my ~/.emacs init file, does this mean it does not exist? In that case, would it be smart to create one myself using the emacs editor? If so, are there any outstanding things I should know before attempting to create one?


回答1:


C-x C-f ~/.emacs will take you to it.

See the Emacs manual, nodes Init File and Find Init.




回答2:


To open your emacs init file, type M-: (find-file user-init-file) RET. If you only want to see its path, you can use C-h v user-init-file RET.



来源:https://stackoverflow.com/questions/27869909/what-to-do-if-i-cannot-find-my-emacs-init-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!