Open Emacs with --debug-init on OS X

10

4

I am trying to debug why my .emacs does not load. Error message.

Invalid read syntax: # ... Start Emacs with
the `--debug-init' option to view a complete error backtrace.

My question is: How do I do that? What I've tried so far is this.

open -a --debug-init Emacs.app

Unable to find application named '--debug-init'

open -a Emacs.app --debug-init

open: unrecognized option `--debug-init'

I have my emacs configuration file in my home directory.

r4.

Posted 2012-08-07T14:21:46.710

Reputation: 467

Answers

15

I'm not on a Mac right now so I can't check, but this should work:

open -a /Applications/Emacs.app --args --debug-init

Note: requires Snow Leopard and later.

EDIT: You can also try this:

/Applications/Emacs.app/Contents/MacOS/emacs --debug-init

If that doesn't work, try capitalizing the "E" in "emacs". (I'm not sure how Emacs.app is structured internally, but the core executable should probably be one of the two.)

oboewan42

Posted 2012-08-07T14:21:46.710

Reputation: 176

Many thanks, it is working! Accepting when I've solved the error. – r4. – 2012-08-07T14:43:02.193

Which one of the two worked? (Still not at my Mac ATM) – oboewan42 – 2012-08-07T19:32:07.327

Both two gives exactly the same result. Success! – r4. – 2012-08-07T19:48:40.810