当前位置: 动力学知识库 > 问答 > 编程问答 >

emacs - Wrong type argument: stringp, nil error

问题描述:

I need to use update-directory-autoloads function in a little el-script. When I'm trying to call this function with an argument that is a name of a directory I receive this error:

Wrong type argument: stringp, nil.

Call looks like this:

(update-directory-autoloads "~/test")

网友答案:

Generating autoload files is poorly documented. You're experiencing the problem that arises because you haven't set the variable generated-autoload-file. Try the following:

(let ((generated-autoload-file "~/test/loaddefs.el"))
  (update-directory-autoloads "~/test"))

Update the generated-autoloads-file binding to be the location where you want the loaddefs.el file to live.

网友答案:

When you get Wrong type argument: foo, bar., you should M-: (setq debug-on-error t) RET and then reproduce the error so as to get a backtrace. Actually, you can set debug-on-error like that in your .emacs and Emacs usually stays perfectly useable.

分享给朋友:
您可能感兴趣的文章:
随机阅读: