wrong type argument: stringp, nil

南笙酒味 提交于 2019-11-29 22:19:26
Trey Jackson

You'll need to provide more information to be sure. Try setting

(setq debug-on-error t)

which will give you a stack trace showing what function is complaining about the string being nil.

My guess is that buffer-file-name is returning nil, and that's where the problem lies (not all buffers have file names). Check out the debugging section of An Introduction To Programming in Emacs Lisp, or the debugging section of the Emacs Lisp manual.

The secret to finding a problem in your init file is not a secret: binary search.

Use comment-region to comment out half your init file, then 3/4, 7/8,... It is very quick to identify the problem. comment-region also uncomments: C-h f comment-region RET.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!