mlf176f2/yas-jit.el — Issue #1: yas-jit does not recognize new snippets
Author: mlf176f2
Created: 2011-11-23 22:58:25+00:00
State: open

Hi Matthew,

I just found your package, and it looks very, very promising. However, when
creating new snippets, I did not find how to make YAS aware of it. They're
still ignored, even after yas/reload-all and the like.

Here is my config:

#+begin_src emacs-lisp
;; Yet Another Snippet extension for Emacs
(require 'yas-jit)

;; root directories that store the snippets
(setq yas/root-directory nil)
(let ((my-snippets
my/yasnippet-directory)
(org-snippets
(concat "~/src/" "yasnippet-org-mode"))
(latex-snippets
(concat "~/src/" "yasnippets-latex"))
(local-snippets
my/local-yasnippet-directory))
(when (file-directory-p local-snippets)
(add-to-list 'yas/root-directory local-snippets))
(when (file-directory-p latex-snippets)
(add-to-list 'yas/root-directory latex-snippets))
(when (file-directory-p org-snippets)
(add-to-list 'yas/root-directory org-snippets))
;; the first element is always the user-created snippets directory
(when (file-directory-p my-snippets)
(add-to-list 'yas/root-directory my-snippets)))

;; load the snippets
(yas/jit-load)

;; enable the YASnippet menu and tab-trigger expansion in *all*
;; buffers
(yas/global-mode)

;; text that will be used in menu to represent the trigger
(setq yas/trigger-symbol " ")
#+end_src

Any idea?

Best regards,
Fabrice