From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Oliver Charles" Subject: Re: Using yasnippet with org Mode Date: Mon, 24 Nov 2008 00:45:10 +0000 Message-ID: <5641883d0811231645v2b3bfe85qede95949bf2610fe@mail.gmail.com> References: <4929ADBB.6050809@manor-farm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4PZk-0002r7-2Y for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 19:45:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4PZh-0002qv-M9 for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 19:45:14 -0500 Received: from [199.232.76.173] (port=42317 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4PZh-0002qs-Hk for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 19:45:13 -0500 Received: from mail-qy0-f17.google.com ([209.85.221.17]:34990) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L4PZf-00088v-Ee for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 19:45:12 -0500 Received: by qyk10 with SMTP id 10so1752362qyk.18 for ; Sun, 23 Nov 2008 16:45:10 -0800 (PST) In-Reply-To: <4929ADBB.6050809@manor-farm.org> Content-Disposition: inline List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ian Barton Cc: emacs-orgmode Org-Mode Hi, sorry to be a little off topic but... I'm curious to hear what snippets people are using with org-mode. Anyone fancing sharing? - OLlie On Sun, Nov 23, 2008 at 7:23 PM, Ian Barton wrote: > Someone on the list mentioned yasnippet a while ago. I have been trying it > out and I like it. However, I can't get it to play nicely with org mode. I > have read various fixes, but none seem to work for me. To summarize what I > have done: > > In my .emacs: > > (require 'org-install) > > ;; Yasnippet > (add-to-list 'load-path "~/.emacs-lisp/plugins") > (require 'yasnippet) > (add-to-list 'yas/extra-mode-hooks > 'python-mode-hook) > (yas/initialize) > (yas/load-directory "~/.emacs-lisp/snippets/") > > ;; Make Yasnippet play nicely with org mode. > (add-hook 'org-mode-hook > '(lambda () > (make-variable-buffer-local 'yas/trigger-key) > (setq yas/trigger-key [tab]))) > > When I run C-h k I get: > > runs the command yas/expand > which is an interactive Lisp function in `yasnippet.el'. > It is bound to , TAB. > (yas/expand) > > Expand a snippet. > > I can see yas in my status line when I open an org file and using tab with > yasnippet works fine in other text mode files. I think that I am probably > missing something obvious, as other people can get it to work. > > Ian. > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode >