From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Using yasnippet with org Mode Date: Sun, 23 Nov 2008 19:23:39 +0000 Message-ID: <4929ADBB.6050809@manor-farm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L4KYm-0000QP-PL for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 14:23:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4KYk-0000QD-K6 for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 14:23:55 -0500 Received: from [199.232.76.173] (port=34565 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4KYk-0000QA-Fu for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 14:23:54 -0500 Received: from a2s22.a2hosting.com ([69.39.86.130]:47427) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L4KYi-0001uu-L6 for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 14:23:54 -0500 Received: from [217.146.125.43] (helo=firewall.banter.local) by a2s22.a2hosting.com with esmtp (Exim 4.69) (envelope-from ) id 1L4KYg-00045M-63 for emacs-orgmode@gnu.org; Sun, 23 Nov 2008 14:23:50 -0500 Received: from localhost (localhost [127.0.0.1]) by firewall.banter.local (Postfix) with ESMTP id CEF4BDA04 for ; Sun, 23 Nov 2008 19:25:51 +0000 (GMT) Received: from firewall.banter.local ([127.0.0.1]) by localhost (firewall.banter.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CW1MKu0ZjVxg for ; Sun, 23 Nov 2008 19:25:43 +0000 (GMT) Received: from [192.168.0.60] (scamper.banter.local [192.168.0.60]) by firewall.banter.local (Postfix) with ESMTP id D6B23C7CB for ; Sun, 23 Nov 2008 19:25:41 +0000 (GMT) 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: emacs-orgmode Org-Mode 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.