This is the most useless error message I have ever seen.
I think it translates to .. “error”.
The full error message from the *Messages* buffer is:
File mode specification error: (wrong-type-argument characterp "string value here")
I think the latter part of that message means that emacs was expecting a character and got a string.
But how do I go about diagnosing just what it means when emacs tells me “File mode specification error” ? and how do I narrow down where this error is originating?
How are these two errors (file mode error, expecting character and got string) related?
Use M-x
toggle-debug-on-errorRET to drop into the debugger when this (or any) error occurs — assuming that this is a proper error, and not just a message. That gives you the stack trace, so you can figure out what caused it, and proceed from there (possibly with edebug, once you’ve determined which function(s) to instrument, but you can do plenty with the regular debugger).Standard debugger commands:
M-:
(info "(elisp) Debugger Commands")RETMain manual entry for debugging lisp (including edebug):
M-:
(info "(elisp) Debugging")RETFYI, rgrep tells me that the only instance of the string “File mode specification error” in the *.el files for NTEmacs 23.2.1 appears in the
normal-modefunction definition:M-x
find-functionRETnormal-modeRET