Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The warning that I get, as soon as I open Emacs is this:

Warning (initialization): An error occurred while loading `/Users/Kaileeena/.emacs':

End of file during parsing: /Users/Kaileeena/.emacs

To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace.

But how do I do that?

I've never used this software before, and I can't figure out where to even type.

share|improve this question
    
That ususally means -- You missed a bracket in .emacs -- or some package that You require missed that. Try to recall what You've been fidling with recently. – Adobe Mar 28 '13 at 5:17
up vote 5 down vote accepted

You're running Mac OS, right? Assuming you installed Emacs into the Applications folder, open a Terminal window (it's in the Utilities subfolder inside Applications) and type:

/Applications/Emacs.app/Contents/MacOS/Emacs --debug-init
share|improve this answer
    
Thanks for your help, but I'm getting the same result as when I tried that through Emacs. All I see is a blank window. I was wondering if there should be some sort of log that would tell me exactly why I'm getting the warning in the first place? – Kaileeena Jan 23 '13 at 14:54
    
Hm, --debug-init should show you where the problem is... You could try adding -nw ("no window") to that command line. It will make Emacs run inside the terminal window, which might make it less confused. – legoscia Jan 23 '13 at 16:48

In addition to the suggestions to use emacs --debug-init, do this: Bisect your init file (~/.emacs) recursively until you find the problematic code. (E.g., use M-x comment-region to comment out half the code, then 1/4, then 1/8, then 1/16,... (With prefix arg C-u the same command uncomments the region.)

This is a binary search, so it is very quick to do.

But as @Adobe suggested, it is likely that you are missing one or more closing parens. Another approach is to use C-M-f repeatedly (just hold down that chord), until you get the error. That will be where you are missing a paren. (Start at the top level of the file and the leftmost paren of your first sexp.)

share|improve this answer

When you start emacs from a terminal simply add it after the command so that your complete command looks like emacs --debug-init.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .