From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Danil Orlov Newsgroups: gmane.emacs.devel Subject: Including Yasnippet to Emacs Date: Mon, 17 Mar 2014 06:10:12 +0200 Message-ID: <20140317041012.GA24472@debian> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1395029412 30525 80.91.229.3 (17 Mar 2014 04:10:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2014 04:10:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 17 05:10:22 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WPOsX-0004nd-OU for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2014 05:10:21 +0100 Original-Received: from localhost ([::1]:55474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPOsX-0003tc-3X for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2014 00:10:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPOsU-0003qT-JB for emacs-devel@gnu.org; Mon, 17 Mar 2014 00:10:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPOsT-0002wC-Kf for emacs-devel@gnu.org; Mon, 17 Mar 2014 00:10:18 -0400 Original-Received: from mail-ee0-x236.google.com ([2a00:1450:4013:c00::236]:54589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPOsT-0002w6-DK for emacs-devel@gnu.org; Mon, 17 Mar 2014 00:10:17 -0400 Original-Received: by mail-ee0-f54.google.com with SMTP id d49so3633069eek.13 for ; Sun, 16 Mar 2014 21:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=nSflZid2WJrOwnpsr4NsW0nJQImULWnO1pA4KMnkzSQ=; b=RwYi+gXupufg7vqk77P5kIAVa+YHudlv6lwzKM0OwxOk1NZdjEw3NdqVSI9dkCWSvs LqQ8VVYwCpYMXwqmvnbmC6iWd6wYt2ogScaYZM3GLaMvVPMLhMFAzHLLJLLGhNg+Oj0D Dey2BMFB+b1/IO36+vVyzT17E6DWDFcWGzwAgxGfmpqN7Wor2tRb8N+qcMXEieW4XmYN 1yULBo3P1+5LRnQg5B0PfFDLMSIwY4GuFRv9vOc9BL+ZYA9P6nQoDGWSq4iowQKU1Bh4 opkNaFmY5RvJX7e60iIs5IL21IO4Gr8p4806CjkoQhiHWw7I9xsS2TE2B6hDcgC1KpiE oT7w== X-Received: by 10.14.37.8 with SMTP id x8mr21273409eea.32.1395029416073; Sun, 16 Mar 2014 21:10:16 -0700 (PDT) Original-Received: from debian ([2001:5c0:1400:a::af]) by mx.google.com with ESMTPSA id i47sm36718843eeg.6.2014.03.16.21.10.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 16 Mar 2014 21:10:15 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:170428 Archived-At: I know that everybody want to push to Emacs standard distro something what he needs. But snippets is another question - it is too wide used technology to be ignored. Sublime Text Editor, TextMate has it, all Jetbrains IDEs has it, I even think that every IDE nowdays has it. That's bad argument, but I have another one - lots of modes creates its own wheel to support snippets. html-mode uses own snippets for tags web-mode uses own snippets "C-c C-s" markdown-mode uses own snippets for headers and that's only modes I use. I think that if Emacs will have unified mechanism for managing snippets, it will be useful not only for end users, but also for mode creators. And those snippets-for-each-mode also steal keybindings. And many of us uses Yasnippet too, so we in fact always have two different snippet engines. Of course now Yasnippet probably a bit clumsy for usage via API. Maybe something like this must be supported, to migrate mode snippets easily. (yas/api-add-snippet "html-mode" ; mode "h1" ; name and key "C-x n 1" ; keyboard shortcut "

$1

" ; snippet body ) So you, as mode author, must not think about bindings, creating function for each snippet. What do you think about it?