[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] YASnippet fix not working

From: Eric S Fraga
Subject: Re: [Orgmode] YASnippet fix not working
Date: Sun, 02 Aug 2009 23:59:59 +0100
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.7 Emacs/23.0.96 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Sun, 02 Aug 2009 14:21:58 -0500,
Kyle Sexton wrote:
> I'm trying to get YASnippet working with org-mode, but the fix I've
> found online doesn't seem to be working.
> --snip--
> (add-hook 'org-mode-hook
>           (lambda ()
>             (org-set-local 'yas/trigger-key [tab])
>             (define-key yas/keymap [tab] 'yas/next-field-group)))
> --snip--
> I've added the above code to my emacs init file.  When I run C-h k
> <tab> in an org-file, it still reports that org-cycle is bound to
> tab.

Two things:

1. make sure you initialise yasnippet *before* org-mode.

2. my configuration is:

(add-hook 'org-mode-hook
          '(lambda ()
             (make-variable-buffer-local 'yas/trigger-key)
             (setq yas/trigger-key [tab])
             (define-key yas/keymap [tab] 'yas/next-field-group)

which works for me.  Maybe give this a try?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]