1

trying to install yasnippet for emacs 23 from https://github.com/joaotavora/yasnippet

Firstly I attempted the quick install but the yasnippet-bundle.el for the 'quick' install doesn't seem to be in the repository?

Secondly I attempted the full install.

When trying to do the full install I get the following error:

[yas] Check your `yas/snippet-dirs': ~/.emacs.d/snippets is not a directory

I have downloaded the latest bundle joaotavora-yasnippet-e53c41d/ and unpacked in into .emacs.d/plugins/

the addition to my `.emacs' is:

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

Basically, the install instructions seem to have become out of sync with the latest src. Does anyone know how to install it?

BinaryButterfly
  • 18,137
  • 13
  • 50
  • 91
bph
  • 10,728
  • 15
  • 60
  • 135

1 Answers1

4

You need to initialize yas/root-directory. Here is how I setup yasnippet

(require 'yasnippet "~/emacs/addons/yasnippet.el")
(yas/initialize)
(setq yas/root-directory "~/emacs/snippets")
(yas/load-directory yas/root-directory)
Oleg Pavliv
  • 20,462
  • 7
  • 59
  • 75
  • many thanks, I was following the install instructions from the github page, I should have read the install instructions within the download bundle README - these were correct. All working now... – bph Nov 22 '11 at 10:57