如何配置我的emacs配置?

Pho*_*hob 14 emacs profiling dot-emacs

我的emacs配置需要很长时间才能加载.如何轻松找到有问题的部件并对其进行优化?

Jür*_*zel 27

非常有用的包:http://www.emacswiki.org/emacs/ProfileDotEmacs

只需跳过加载您的init文件,让ProfileDotEmacs为您加载/配置它:

emacs -Q -l profile-dotemacs.el -f profile-dotemacs
Run Code Online (Sandbox Code Playgroud)

  • 失败的'错误的类型参数:number-or-marker-p,nil'对我来说. (3认同)
  • 维基是Emacs所有事物的无限智慧之源. (2认同)
  • @Phob:我鼓励您单击该答案旁边的对勾,位于向上/向下投票按钮下方。:-) (2认同)
  • @ Micha90如果显示0秒,则可能意味着您需要定义正确的.el文件以运行探查器.默认情况下它是`〜/ .emacs`,但在我的情况下我需要将它改为`〜/ .emacs.d/init.el`.在`profile-dotemacs.el`文件中,更改名为`profile-dotemacs-file`的变量的值. (2认同)

leg*_*cia 7

另一种解决方案是ESUP,即 Emacs 启动分析器。它可以在不离开 Emacs 的情况下分析您的配置文件 - 它通过启动一个新的 Emacs 作为子进程并从中获取配置文件信息来实现这一点。