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.


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.)

  • Many thanks, it is working! Accepting when I've solved the error. – r4. Aug 7 '12 at 14:43
  • Which one of the two worked? (Still not at my Mac ATM) – oboewan42 Aug 7 '12 at 19:32
  • Both two gives exactly the same result. Success! – r4. Aug 7 '12 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.