* problemi with simple ya-snippets
@ 2014-02-28 7:42 Luca Ferrari
2014-03-03 13:23 ` Luca Ferrari
0 siblings, 1 reply; 4+ messages in thread
From: Luca Ferrari @ 2014-02-28 7:42 UTC (permalink / raw)
To: help-gnu-emacs
Hi all,
I'm trying to configure a couple of simple snippets for PHP, as follows:
# name: foreach ... { ... }
# key: fore
# --
foreach ( \$${1:array} as \$${2:current_element} ) {
$0
}
# name: foreach ... { ... }
# key: kfor
# --
foreach ( array_keys( \$${1:array} ) as \$${2:current_key} ) {
$0
}
stored respectively into the snippets directory as php/fore and php/kfor.
After that I do yas/reload-all and try my new snippets. Pressing tab
has no effect, while calling M-x yas-expand works for the fore snippet
but not for the kfor. Any idea about what am I missing?
I'm running yasnippet 0.8 installed via elpa on emacs 24.3.1.
Thanks,
Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problemi with simple ya-snippets
2014-02-28 7:42 problemi with simple ya-snippets Luca Ferrari
@ 2014-03-03 13:23 ` Luca Ferrari
2014-03-04 11:11 ` Christian Henz
0 siblings, 1 reply; 4+ messages in thread
From: Luca Ferrari @ 2014-03-03 13:23 UTC (permalink / raw)
To: help-gnu-emacs
I'm still fightining with this snippet problem. I've found that when I
do execute yas/reload-all I got the following:
[yas] Loaded /home/luca/.emacs.d/elpa/yasnippet-0.8.0/snippets
[yas] Check your `yas-snippet-dirs': ~/.emacs.d/snippets is not a directory
[yas] Reloaded everything... (some errors, check *Messages*).
and my yasnippet installation is into ~/.emacs.d/elpa/yasnippet-0.8.0
(and "snippets" is under such directory).
The yas-snippet-directories has the following value:
("~/.emacs.d/snippets" "/home/luca/.emacs.d/elpa/yasnippet-0.8.0/snippets")
but this should not be the source of the error, I suppose.
Any idea?
Thanks,
Luca
On Fri, Feb 28, 2014 at 8:42 AM, Luca Ferrari <fluca1978@infinito.it> wrote:
> Hi all,
> I'm trying to configure a couple of simple snippets for PHP, as follows:
>
> # name: foreach ... { ... }
> # key: fore
> # --
> foreach ( \$${1:array} as \$${2:current_element} ) {
> $0
> }
>
>
> # name: foreach ... { ... }
> # key: kfor
> # --
> foreach ( array_keys( \$${1:array} ) as \$${2:current_key} ) {
> $0
> }
>
>
> stored respectively into the snippets directory as php/fore and php/kfor.
> After that I do yas/reload-all and try my new snippets. Pressing tab
> has no effect, while calling M-x yas-expand works for the fore snippet
> but not for the kfor. Any idea about what am I missing?
> I'm running yasnippet 0.8 installed via elpa on emacs 24.3.1.
>
> Thanks,
> Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problemi with simple ya-snippets
2014-03-03 13:23 ` Luca Ferrari
@ 2014-03-04 11:11 ` Christian Henz
2014-03-04 12:01 ` Luca Ferrari
0 siblings, 1 reply; 4+ messages in thread
From: Christian Henz @ 2014-03-04 11:11 UTC (permalink / raw)
To: Luca Ferrari; +Cc: help-gnu-emacs
> [yas] Loaded /home/luca/.emacs.d/elpa/yasnippet-0.8.0/snippets
> [yas] Check your `yas-snippet-dirs': ~/.emacs.d/snippets is not a directory
> [yas] Reloaded everything... (some errors, check *Messages*).
>
Maybe the '~' needs to be expanded? (manually, or via 'expand-file-name').
Cheers,
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problemi with simple ya-snippets
2014-03-04 11:11 ` Christian Henz
@ 2014-03-04 12:01 ` Luca Ferrari
0 siblings, 0 replies; 4+ messages in thread
From: Luca Ferrari @ 2014-03-04 12:01 UTC (permalink / raw)
To: Christian Henz; +Cc: help-gnu-emacs
Hi Christian,
On Tue, Mar 4, 2014 at 12:11 PM, Christian Henz <ChrHenz@gmx.net> wrote:
>> [yas] Loaded /home/luca/.emacs.d/elpa/yasnippet-0.8.0/snippets
>> [yas] Check your `yas-snippet-dirs': ~/.emacs.d/snippets is not a directory
>> [yas] Reloaded everything... (some errors, check *Messages*).
>>
>
> Maybe the '~' needs to be expanded? (manually, or via 'expand-file-name').
>
I don't think: the directory does not exist, but the right one is the
first one ( /home/luca/.emacs.d/elpa/yasnippet-0.8.0/snippets) which
is loaded and works. I mean, all preloaded snippets are working (e.g.,
Perl), while mine are not.
The real problem is that the TAB does not expand my snippets, while
yas-expand does. Could it be something that is clashing with the usage
of TAB?
Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-04 12:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-28 7:42 problemi with simple ya-snippets Luca Ferrari
2014-03-03 13:23 ` Luca Ferrari
2014-03-04 11:11 ` Christian Henz
2014-03-04 12:01 ` Luca Ferrari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).