Hi João,
Thanks so much for looking into this. I wonder if I'm stumped by
something incredibly basic here that an experienced user wouldn't ever
think would stump anybody.
I used elpa/melpa to get the YAsnippet package, so all of the bundled
snippets are in ~/.emacs.d/elpa/yasnippet-20140427.1224/snippets,
whereas my "piano" snippet is all alone in ~/emacs.d/plugins/yasnippet.
Below is a recap of what just happened when I created a new snippet
following some of what you just laid out.
<<M-x yas-new-snippet>>
# -*- mode: snippet; require-final-newline: nil -*-
# name: new
# key: new
# binding: direct-keybinding
# expand-env: ((some-var some-value))
# type: command
# --
a new test snippet
<<I hit "C-c C-c">>
[yas] Looks like a library or new snippet. Save to new file? (y or n)
<<I hit "y">>
Guessed directory (~/.emacs.d/plugins/yasnippet/snippet-mode) for table
"snippet-mode" does not exist! Create? (y or n)
<<I hit "y">>
Saving file /home/steven/.emacs.d/plugins/yasnippet/snippet-mode/new...
Wrote /home/steven/.emacs.d/plugins/yasnippet/snippet-mode/new
<<I request to reload everything>>
Some buffers editing live snippets, close them and proceed with reload?
<<I hit "y">>
[yas] Loading compiled snippets ...
<<it loads all the expected stuff, including the various directories
I've been creating:>>
[yas] Loading compiled snippets from /home/steven/.emacs.d/plugins/yasnippet/snippet-mode
[yas] Loading compiled snippets from /home/steven/.emacs.d/plugins/yasnippet/snippets
[yas] Loaded ~/.emacs.d/plugins/yasnippet
[yas] Reloaded everything....
So that's that. Now I wonder if my trouble might be in how I try to call
the snippet?
In a buffer running org-mode, if I type blog[TAB] the snippet expands
immediately. However, if I try piano[TAB] or new[TAB] nothing happens.
So ... that's where I'm at! Maybe this is too long ... sorry!
Thanks again.
-Steven