Emacs - Ubuntu初始化 [英] Emacs - Ubuntu initialization
问题描述
它是否在.emacs之前或之后加载/etc/emacs/site-start.d文件,还有默认加载的其他位置?
Emacs初始化的顺序如下(至少对于Emacs 22):
- 加载 load-path 中的文件 debian-startup (.el或.elc)(通常是 / usr / share / emacs / site-lisp / debian-startup.el 或 /usr/share/emacs22/site-lisp/debian-startup.elc ),并调用定义的功能 debian-startup 这个文件。此功能将加载/etc/emacs/site-start.d/ 和 /etc/emacs22/site-start.d/ 中的所有文件。
- 加载 site-start (.el或.elc)在 load-path 中找到
- 加载你的init文件 .emacs , .emacs.el 或〜/ .emacs.d / init.el 。
- 加载默认的init文件 default.el 或 default.elc 。
我还建议您阅读更多Ubuntu中的 /usr/share/doc/emacsen-common/debian-emacs-policy.gz 中的 Emacs启动策略部分/ Debian具体信息。要查找奇怪行为的原因,您可以使用参数 - 无站点文件启动emacs,并逐个加载这些init文件,直到找到导致此行为的文件。
Odd behavior loading emacs on ubuntu, there seems to be some initialization that goes on that is not in the .emacs nor in any of the files emacs reports loading through "emacs --debug-init". I've found some references to font-related resizing but this behavior doesn't seem to be limited to that (e.g reappearing menus and toolbars).
Does anyone have any additional information about the emacs initialization process? Does it load /etc/emacs/site-start.d files before or after the .emacs, and are there any other locations it loads by default?
The sequence of the Emacs initialization is the following (at least, for Emacs 22):
- Load the file debian-startup (.el or .elc) found in load-path (usually, /usr/share/emacs/site-lisp/debian-startup.el or /usr/share/emacs22/site-lisp/debian-startup.elc) and call the function debian-startup defined in this file. This function loads all files in /etc/emacs/site-start.d/ and /etc/emacs22/site-start.d/.
- Load site-start (.el or .elc) found in load-path.
- Load your init file .emacs, .emacs.el or ~/.emacs.d/init.el.
- Load a default init file default.el or default.elc.
I also suggest you reading the section "Emacs startup strategy" in /usr/share/doc/emacsen-common/debian-emacs-policy.gz for more Ubuntu/Debian specific information. To find the reason of odd behavior you can start emacs with the argument --no-site-file and load these init files one by one until you find a file that causes this behavior.
这篇关于Emacs - Ubuntu初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!