什么';Emacs的启动顺序是什么?

什么';Emacs的启动顺序是什么?,emacs,Emacs,我找到了.emacs和~/.emacs.d/init.el 这些文件/目录是用来做什么的? emacs的启动顺序是什么?是否有任何方法可以使emacs不读取~/.emacs.d?emacs-q或emacs——没有init文件会导致emacs不读取~/.emacs文件。如果存在~/.emacs文件,则不应尝试读取~/.emacs.d。如果没有~/.emacs文件,它将读取~/.emacs.d/init.el。有关更多信息,请参阅 有关启动的信息,请参见。基于,我做了一些实验,在~/.emacs.d

我找到了.emacs和~/.emacs.d/init.el

这些文件/目录是用来做什么的?
emacs的启动顺序是什么?是否有任何方法可以使emacs不读取~/.emacs.d?

emacs-q
emacs——没有init文件
会导致emacs不读取~/.emacs文件。如果存在~/.emacs文件,则不应尝试读取~/.emacs.d。如果没有~/.emacs文件,它将读取~/.emacs.d/init.el。有关更多信息,请参阅

有关启动的信息,请参见。

基于,我做了一些实验,在~/.emacs.d/init.el的末尾添加了(message“*message*”)、我的个人el文件(smcho.el)和.emacs.el,并打开了Messages buffer

这是Aquamacs的结果

Loading prestart plugin files ... ... done. Shell: /bin/bash Loading `emulate-mac-keyboard-mode': old-style backquotes detected! Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/Recent Files.el (source)...done Cleaning up the recentf list...done (0 removed) 27 environment variables imported from login shell (/bin/bash). Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/auctex.el (source)...done Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/edit-modes/haskell-mode/haskell-site-file.el (source)...done Loading plugins ... Loading /Library/Application Support/Aquamacs Emacs/SLIME/site-start.el (source)...done Loading /Applications/Aquamacs.app/Contents/Resources/lisp/aquamacs/site-start.el (source)...done ... done. ***** Hello from .emacs, and I'm with Aquamacs ***** hello from smcho.el Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/customizations.el (source)...done Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/Preferences.el (source)...done Mark set one-buffer-one-frame-mode disabled. Loading /Users/smcho/Library/Preferences/Aquamacs Emacs/frame-positions.el (source)...done 正在加载预启动插件文件。。。 ... 完成。 Shell:/bin/bash 正在加载“模拟mac键盘模式”:检测到旧式反引号! 正在加载/Users/smcho/Library/Preferences/Aquamacs Emacs/Recent Files.el(源)…完成 正在清理recentf列表…完成(已删除0) 27个从登录shell(/bin/bash)导入的环境变量。 加载/Applications/Aquamacs.app/Contents/Resources/lisp/Aquamacs/edit-modes/auctex.el(源)…完成 加载/Applications/Aquamacs.app/Contents/Resources/lisp/Aquamacs/edit-modes/haskell-mode/haskell-site-file.el(源)…完成 正在加载插件。。。 加载/库/应用程序支持/Aquamacs Emacs/SLIME/site-start.el(源)…完成 加载/Applications/Aquamacs.app/Contents/Resources/lisp/Aquamacs/site-start.el(源)…完成 ... 完成。 *****emacs的你好,我是Aquamacs的 *****你好,来自smcho.el 加载/Users/smcho/Library/Preferences/Aquamacs Emacs/customizations.el(源)…完成 正在加载/Users/smcho/Library/Preferences/Aquamacs Emacs/Preferences.el(源)…完成 标记集 一个缓冲区一帧模式已禁用。 加载/Users/smcho/Library/Preferences/Aquamacs Emacs/frame-positions.el(源)…完成 它读取.emacs和smcho.el,但不读取~/.emacs.d/init.el。 这是来自Aqua emacs的

Loading /Users/smcho/.emacs.d/package.el (source)...done ***** Hello from .emacs, and I'm with Aqua emacs ***** hello from smcho.el For information about GNU Emacs and the GNU system, type C-h C-a. 正在加载/Users/smcho/.emacs.d/package.el(源)…完成 *****emacs的你好,我是Aqua emacs的 *****你好,来自smcho.el 有关GNU Emacs和GNU系统的信息,请键入C-h C-a。
同样,它不从~/.emacs.d/init.el读取,而是从~/.emacs.d/package.el开始读取

Emacs的启动程序已详细说明。emacs lisp手册随emacs一起提供,因此您应该参考该手册,而不是web上的链接手册,因为前者将与您的emacs版本完全匹配。要访问它,在emacs type
C-h i m elisp RET m Starting Up RET

中,如果存在.emacs文件,则emacs不会加载~/.emacs.d/init.el文件,如果要使用.emacs.d/init.el文件,则应删除~/.emacs文件