在 OS X 上使用 --debug-init 打开 Emacs

r4.*_*r4. 11 terminal emacs debug macos

我正在尝试调试why my .emacs does not load.错误消息。

Invalid read syntax: # ... Start Emacs with
the `--debug-init' option to view a complete error backtrace.
Run Code Online (Sandbox Code Playgroud)

我的问题是:我该怎么做?到目前为止我尝试过的是这个。

open -a --debug-init Emacs.app

Unable to find application named '--debug-init'
Run Code Online (Sandbox Code Playgroud)

open -a Emacs.app --debug-init

open: unrecognized option `--debug-init'
Run Code Online (Sandbox Code Playgroud)

我的主目录中有我的 emacs 配置文件。

小智 16

我现在不在 Mac 上,所以我无法检查,但这应该有效:

open -a /Applications/Emacs.app --args --debug-init
Run Code Online (Sandbox Code Playgroud)

注意:需要 Snow Leopard 及更高版本。

编辑:你也可以试试这个:

/Applications/Emacs.app/Contents/MacOS/emacs --debug-init
Run Code Online (Sandbox Code Playgroud)

如果这不起作用,请尝试将“emacs”中的“E”大写。(我不确定 Emacs.app 的内部结构,但核心可执行文件应该是两者之一。)