views:

51

answers:

1

I tried to install yasnippet using the "normal install" protocol given here. After placing the yasnippet-0.6.1c folder in ~/.emacs.d/plugins/, I tried to eval the following in my .emacs:

(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")

At the second sexp, I get the backtrace:

 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(...

Could anyone point me in the right direction with this? I'm not familiar enough with Emacs to be certain that this is not a user error, but it would seem from the backtrace that at least the loadpath was correct.

This is yasnippet 0.6.1c. I can reproduce it on Aquamacs 1.9 and GNU Emacs 22.2.1 under OSX 10.4 and GNU Emacs 23 under Ubuntu 10.04. Thanks in advance for any advice!

+3  A: 
(add-to-list 'load-path
              "~/.emacs.d/plugins/yasnippet-0.6.1c")
aaa
Hi, thanks for your quick response. Tried this out of curiousity, but it didn't work. (Got an identical backtrace as above.) If you don't mind explaining in further detail:The directory really is "[...]-0.6.1c". Why would I append an "l"?The backtrace seems to suggest to me that Emacs successfully found yasnippet.el in said directory. Is that not the case?Why would appending an "l" to the path _ever_ be a solution to a problem like this? :-)Thanks again.
wvoq
@wvoq that was typo on my part (sorry). You specified yasnippet file rather than directory as your load path.
aaa
@aaa sorry, I mis-copied the path. When I try: (add-to-list 'load-path "~/.emacs.d/plugins/yasnippet-0.6.1c") I still get the same backtrace about yasnippet-bundle being void, though.
wvoq
@wvoq do you have `(require 'yasnippet-bundle)` anywhere?
aaa
@aaa I don't, at least not in my .emacs. It's my (shaky) understanding that yasnippet-bundle compiles all the defined snippets, and is supposed to be created by yasnippet.el(?). I guess I'll just eval yasnippet.el sexp by sexp until it breaks down, and see if that tells me anything. Thanks for all your attention on this.
wvoq
@my only other guess is you have function `yas/compile-* bundle` call somewhere. on Ubuntu you can try to install http://ftp.debian.org/pool/main/y/yasnippet
aaa
@aaa well synaptic fixed it automagically for me. I still don't understand why the out-of-the-box installation would appear broken on two different architectures, but at least it's running now. Thanks again, I'm much obliged.
wvoq
@wvoq you may want to send a bug report to developers.I looked at source files, but did not see anything (I am not very good however)
aaa
@aaa I sent a bug report to the yasnippet folks, and it got classified as irreproducible. The weirdest thing about this issue was that when I traced (require 'yasnippet) with edebug it actually evaluated. I'll try installing on another machine at school and see if I can reproduce it afresh. Thanks again!
wvoq