Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'End of file during parsing' when attempting to exit Emacs

Tags:

emacs

When I attempt to kill Emacs (with save-buffers-kill-terminal) I get the error

End of file during parsing

Looking at the *Messages* buffer, I see:

progn: End of file during parsing

No *Backtrace* buffer shows up, even with debug-on-error set to t.

How do I figure out what is going on?

like image 489
Nathaniel Flath Avatar asked Oct 14 '25 15:10

Nathaniel Flath


1 Answers

Recursively bisect your init file to find which part of it leads to the problem.

Yes, this means restarting and quitting Emacs multiple times, but this is a binary search, so it is in fact very fast, even if it is essentially thoughtless. Importantly, it is systematic, which guessing is typically not.

Likewise, if you find that the problem comes from some library that you load: recursively bisect it to find the problem in it.

And as @phils said, check-parens is also your friend.

like image 171
Drew Avatar answered Oct 18 '25 07:10

Drew