emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including Yasnippet to Emacs


From: Danil Orlov
Subject: Re: Including Yasnippet to Emacs
Date: Mon, 17 Mar 2014 23:12:54 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Can you explain me about snippet.el ?

I've found this one: http://www.emacswiki.org/emacs/SnippetMode 

But as far as I understand you, you working over some backend engine for 
yasnippet?

On Mon, Mar 17, 2014 at 08:23:58PM +0000, João Távora wrote:
> Stefan <address@hidden> writes:
> 
> > snippet.el is not designed to be user-friendly, but to be easy to
> > integrate in a major-mode instead (yasnippet rather sucks in this
> > regard, you end up needing to distribute umpteen little files
> > instead).
> 
> Actually, you can compile these umpteen little files into one file per
> mode. See `yas-compile-directory'. Few use it AFAIK, but it's there and
> it should work (at least the tests show it does).
> 
> And that's because yasnippet already has an elisp interface to defining
> snippets, `yas-define-snippets'. There is definitely some suckage to it,
> otherwise I wouldn't be writing snippet.el, but users or distribtors
> aren't forced to deal with those million files.
> 
> > [ BTW, part of the intention behind snippet.el is to make Edebug work
> >   with them.  Si in some cases they may turn out to be more
> >   user-friendly, rather than less so.  ]
> 
> Indeed, I've answered many bugs from those who don't understand why
> snippets don't work as intended, and I don't blame them.
> 
> > As for "not so powerful", I'm not sure what you mean: they should be
> > pretty much as powerful as yasnippet's since yasnippet will be written
> > on top of them.  And of course, they can run any Lisp code you like.
> 
> Danil, snippet.el is in its core just as powerful as yasnippet. Just a
> few bits are missing like in-snippet expansions and snippet revival
> after undo, but I plan to (re)implement them all.
> 
> >> And they are all not manage keybindings.
> > This layer is not provided yet, indeed.  E.g. I want to link snippet.el with
> > abbrevs, so the "table of snippets" will be an abbrev table.
> 
> And I intend to keep the familiar yasnippet keying mechanism in
> yasnippet.el. In general yasnippet will keep most backward
> compatibility.
> 
> > more docs we could provide.  For snippet.el, it's still in flux and
> > there are indeed no docs yet, IIRC.
> 
> `define-snippet's docstring contains the gist of what that main entry
> point will be. It's quite heavy at 60 lines, so maybe parts of it belong
> to the manual, but it should give you an idea of what the defined
> snippets can do. Did you read this docstring, Danil?
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]