Problem with python templates

67 views
Skip to first unread message

Acácio Centeno

unread,
Aug 30, 2013, 9:54:16 AM8/30/13
to smart-...@googlegroups.com
Hi,

I'm new to both emacs and YAS, so this may be a silly question, but when I try to use yasnippet's python templates, say, to create a class, this is what happens:

class ClassName(object):
    """
    """
   
    def __init__(self, ):
        """
        [yas] elisp error! Symbol's value as variable is void: text
        [yas] elisp error! Symbol's value as variable is void: text



I found the file ~/.emacs/plugins/yasnippet/snippets/python-mode/class, but was unable to figure out how to fix the problem. There's a variable called text on line 30:

 27                         (replace-regexp-in-string "[[:blank:]]*$" ""
 28                          (replace-regexp-in-string "^[[:blank:]]*" "" x))) x))
 29                   (mapcar '(lambda (x) (split-string x "="))
 30                           (split-string text ",")))

but I don't know where it should be initialized and how. Any ideas of what is wrong or how could I proceed with the analysis?

I'm using eMacs 24.3 (9.0) on Mac OS X 10.8.4 and installed yasippet from the repo today using:
git clone https://github.com/capitaomorte/yasnippet

Thanks.

João Távora

unread,
Aug 30, 2013, 12:19:06 PM8/30/13
to smart-...@googlegroups.com
Hi, 


I think I just fixed it in the newest commit, but please check yourself.

João


--
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" 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 http://groups.google.com/group/smart-snippet.
For more options, visit https://groups.google.com/groups/opt_out.



--
João Távora
Reply all
Reply to author
Forward
0 new messages