Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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