From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Using yasnippet with org Mode (C-i works TAB doesn't) Date: Sat, 19 Sep 2009 15:03:58 +0200 Message-ID: <87iqff6q81.fsf@gmail.com> References: <4929ADBB.6050809@manor-farm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mozbi-0000Q4-Gl for emacs-orgmode@gnu.org; Sat, 19 Sep 2009 09:04:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mozbf-0000O5-Pp for emacs-orgmode@gnu.org; Sat, 19 Sep 2009 09:04:04 -0400 Received: from [199.232.76.173] (port=49372 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mozbf-0000Nv-Ld for emacs-orgmode@gnu.org; Sat, 19 Sep 2009 09:04:03 -0400 Received: from smtp23.services.sfr.fr ([93.17.128.22]:54158) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mozbf-0008UA-1G for emacs-orgmode@gnu.org; Sat, 19 Sep 2009 09:04:03 -0400 In-Reply-To: (Jeff Kowalczyk's message of "Sat, 19 Sep 2009 05:06:11 +0000 (UTC)") 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: Jeff Kowalczyk Cc: emacs-orgmode@gnu.org Jeff Kowalczyk writes: > (add-hook 'org-mode-hook > (lambda () > (org-set-local 'yas/trigger-key [tab]) > (define-key yas/keymap [tab] 'yas/next-field-group))) According to the yasnippet FAQ (or is it on its forum), it should be (add-hook 'org-mode-hook #'(lambda () (setq yas/fallback-behavior `(apply ,(lookup-key org-mode-map [tab]))) (local-set-key [tab] 'yas/expand))) Anyway, there is one major problem left, it doesn't work with org-indent-mode as, when you press TAB to get to the next field of a snippet, you are sent to the first headline in the org file. I have yet to find a workaround about that. Regards, -- Nicolas Goaziou