TAB expansion not working

Skip to first unread message

Michael Isberg

Apr 3, 2017, 8:42:38 PM4/3/17
to YASnippet Discussion Group

When creating a new snippet with the M-x yas-new-snippet and saving it to default directory, ~/.emacs.d/snippets/lisp-interaction-mode/, then everything works fine.
But when changing the default folder to another one then expansion doesn't work.

I create my snippet in the same directory as above but under ~/.emacs.d/snippets/jinja-mode. When choosing menu YASnippet->Snippet menu behavior->Show all known modes I see the jinja-mode at the top and can expand if pressing on the menu item, but why doesn't tab expansion work?
The mode is Lisp Interaction yas. Do I have to be in a special Jinja mode?

I'm running GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.7).



Anders Eurenius

Apr 4, 2017, 6:24:48 AM4/4/17

Yeah, you need to be in the mode that your snippet is for. There's a also an extra parent reference mechanism, but it doesn't look like that's involved here. (look for .yas-parents, for that)

For example, my lisp-interaction-mode has "defun" which wouldn't make sense in jinja2. In jinja2-mode, it has inherited from html and text, so "br" and "date" both work.


You received this message because you are subscribed to the Google Groups "YASnippet Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit
Reply all
Reply to author
0 new messages