2010-08-02 173 views
1

我试着用here的“正常安装”协议安装yasnippet。放置yasnippet-0.6.1c文件夹中的〜/ .emacs.d /插件/后,我试图在EVAL我的.emacs以下几点:无法安装yasnippet?

(add-to-list 'load-path 
       "~/.emacs.d/plugins/yasnippet-0.6.1c") 
(require 'yasnippet) ;; not yasnippet-bundle 
(yas/initialize) 
(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets") 

在第二SEXP,我得到了回溯:

Debugger entered--Lisp error: (void-variable yasnippet-bundle) 
eval(yasnippet-bundle) 
eval-last-sexp-1(nil) 
eval-last-sexp(nil) 
call-interactively(eval-last-sexp) 
recursive-edit() 
byte-code(... 

任何人都可以用这个指向正确的方向吗?我对Emacs不够熟悉,不能确定这不是用户错误,但从回溯看来,至少加载路径是正确的。

这是yasnippet 0.6.1c。我可以在OSX 10.4下的Aquamacs 1.9和GNU Emacs 22.2.1以及Ubuntu 10.04下的GNU Emacs 23下复制它。预先感谢您的任何建议!

回答

3
(add-to-list 'load-path 
       "~/.emacs.d/plugins/yasnippet-0.6.1c") 
+0

嗨,感谢您的快速响应。试图从好奇,但它没有奏效。 (与上面有相同的回溯)。如果您不介意进一步详细解释: 该目录确实是“[...] - 0.6.1c”。为什么要附加“l”? 回溯似乎告诉我,Emacs在所述目录中成功找到了yasnippet.el。情况并非如此吗? 为什么要在路径上追加一个“l”来解决这样的问题? :-) 再次感谢。 – wvoq 2010-08-02 05:58:15

+1

@wvoq这是我的错字(对不起)。您指定yasnippet文件而不是目录作为加载路径。 – Anycorn 2010-08-02 06:05:15

+0

@aaa抱歉,我错误地复制了路径。当我尝试:(add-to-list'load-path“〜/ .emacs.d/plugins/yasnippet-0.6.1c”)尽管如此,我仍然得到了关于yasnippet-bundle为void的同样的回溯。 – wvoq 2010-08-02 06:16:44