TAB expansion not working

27 views
Skip to first unread message

Michael Isberg

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

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

Regards,

Michael

Anders Eurenius

unread,
Apr 4, 2017, 6:24:48 AM4/4/17
to smart-...@googlegroups.com
Hi

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.

cheers
Anders


--
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 smart-snippe...@googlegroups.com.
To post to this group, send email to smart-...@googlegroups.com.
Visit this group at https://groups.google.com/group/smart-snippet.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages