ARCHIVED: For Emacs, how do I debug a .emacs file?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

To debug a .emacs file, start Emacs with the -debug-init command-line option. This enables the Emacs Lisp debugger before evaluating your .emacs file, and places you in the debugger if something goes wrong. The top line in the trace-back buffer will be the error message, and the second or third line of that buffer will display the Lisp code from your .emacs file that caused the problem.

You can also evaluate an individual function or argument to a function in your .emacs file by moving the cursor to the end of the function or argument and typing C-x C-e or M-x eval-last-sexp.

Use C-h v or M-x describe-variable to check the value of variables which you are trying to set or use.

This information comes from the Emacs FAQ.

At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.

This is document abue in the Knowledge Base.
Last modified on 2018-01-18 08:43:46.