From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: Re: Using yasnippet with org Mode [Solved] Date: Mon, 24 Nov 2008 14:46:28 +0000 Message-ID: <492ABE44.50900@manor-farm.org> References: <4929ADBB.6050809@manor-farm.org> <871vx2f8qs.fsf@gmail.com> <87wseu9m62.fsf@thinkpad.tsdh.de> <87od06dpx0.fsf@gmail.com> 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 1L4eDG-0003PI-LT for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 11:23:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L4djO-00025a-Na for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 10:52:25 -0500 Received: from [199.232.76.173] (port=50544 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L4djN-0001Ux-IL for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 10:52:09 -0500 Received: from a2s22.a2hosting.com ([69.39.86.130]:59704) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L4cyj-00080F-Jr for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 10:03:57 -0500 Received: from [217.146.125.43] (helo=firewall.banter.local) by a2s22.a2hosting.com with esmtp (Exim 4.69) (envelope-from ) id 1L4cya-0006vW-Rq for emacs-orgmode@gnu.org; Mon, 24 Nov 2008 10:03:50 -0500 Received: from localhost (localhost [127.0.0.1]) by firewall.banter.local (Postfix) with ESMTP id 616EADDE7 for ; Mon, 24 Nov 2008 14:48:41 +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 Jro12V88B918 for ; Mon, 24 Nov 2008 14:48:41 +0000 (GMT) Received: from [192.168.0.60] (scamper.banter.local [192.168.0.60]) by firewall.banter.local (Postfix) with ESMTP id F3A1CDDE6 for ; Mon, 24 Nov 2008 14:48:40 +0000 (GMT) In-Reply-To: <87od06dpx0.fsf@gmail.com> 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@gnu.org > As for using yasnippets with tab, the following successfully binds tab > to yas/expand when I start emacs with > > emacs -Q (skips loading customization) > > and then evaluate the following elisp to load yasnippets and org-mode > > (load "~/emacs/elisp/util/yasnippet.el") > (yas/initialize) > (yas/load-directory "~/emacs/snippets") > (add-to-list 'load-path "~/emacs/org") > (require 'org) > (add-hook 'org-mode-hook > (lambda () > ;; yasnippet > (make-variable-buffer-local 'yas/trigger-key) > (setq yas/trigger-key [tab]) > (define-key yas/keymap [tab] 'yas/next-field-group))) > > This works for me using a fairly recent Emacs 23 from cvs. > The answer is: Make sure you have snippets defined for org-mode. If you want to use the snippets from text-mode in org-mode, you can make an empty directory named org-mode in the text-mode directory where you put your text mode snippets. -- pluskid Now working perfectly:) Ian.