* YASnippet fix not working
@ 2009-08-02 19:21 Kyle Sexton
2009-08-02 20:30 ` Eric Schulte
2009-08-02 22:59 ` Eric S Fraga
0 siblings, 2 replies; 4+ messages in thread
From: Kyle Sexton @ 2009-08-02 19:21 UTC (permalink / raw)
To: org-mode
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.
The modeline while working on an org file shows that YASnippet is
running, and manually executing M-x yas/expand will expand the
org-mode hooks that are defined.
For some reason I just can't remap that tab key!
Thanks for any help, pretty soon I'll just remap it to a different
key. :)
--
Kyle Sexton
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: YASnippet fix not working
2009-08-02 19:21 YASnippet fix not working Kyle Sexton
@ 2009-08-02 20:30 ` Eric Schulte
2009-08-02 22:59 ` Eric S Fraga
1 sibling, 0 replies; 4+ messages in thread
From: Eric Schulte @ 2009-08-02 20:30 UTC (permalink / raw)
To: Kyle Sexton; +Cc: org-mode
Kyle Sexton <ks@mocker.org> writes:
> 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--
>
The following works for me
--8<---------------cut here---------------start------------->8---
(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)))
--8<---------------cut here---------------end--------------->8---
>
> 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.
>
C-h c <tab> reports yas/expand for me. Best -- Eric
>
> The modeline while working on an org file shows that YASnippet is
> running, and manually executing M-x yas/expand will expand the
> org-mode hooks that are defined.
>
> For some reason I just can't remap that tab key!
>
> Thanks for any help, pretty soon I'll just remap it to a different
> key. :)
>
> --
> Kyle Sexton
>
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: YASnippet fix not working
2009-08-02 19:21 YASnippet fix not working Kyle Sexton
2009-08-02 20:30 ` Eric Schulte
@ 2009-08-02 22:59 ` Eric S Fraga
2009-08-03 3:05 ` Kyle Sexton
1 sibling, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2009-08-02 22:59 UTC (permalink / raw)
To: Kyle Sexton; +Cc: org-mode
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: YASnippet fix not working
2009-08-02 22:59 ` Eric S Fraga
@ 2009-08-03 3:05 ` Kyle Sexton
0 siblings, 0 replies; 4+ messages in thread
From: Kyle Sexton @ 2009-08-03 3:05 UTC (permalink / raw)
To: Eric S Fraga; +Cc: org-mode
At Sun, 02 Aug 2009 23:59:59 +0100,
Eric S Fraga <ucecesf@ucl.ac.uk> wrote:
>
>
> 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?
Thanks, turns out the issue was with me running
yasnippet-0.6.0c. After switching to 0.5.10 everything is working as
expected.
--
Kyle Sexton
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-03 3:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-02 19:21 YASnippet fix not working Kyle Sexton
2009-08-02 20:30 ` Eric Schulte
2009-08-02 22:59 ` Eric S Fraga
2009-08-03 3:05 ` Kyle Sexton
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.