emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Kyle Sexton <ks@mocker.org>
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: YASnippet fix not working
Date: Sun, 02 Aug 2009 14:30:48 -0600	[thread overview]
Message-ID: <m21vnuq7pj.fsf@gmail.com> (raw)
In-Reply-To: <87fxcanhrd.wl%ks@mocker.org> (Kyle Sexton's message of "Sun, 02 Aug 2009 14:21:58 -0500")

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

  reply	other threads:[~2009-08-02 20:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-02 19:21 YASnippet fix not working Kyle Sexton
2009-08-02 20:30 ` Eric Schulte [this message]
2009-08-02 22:59 ` Eric S Fraga
2009-08-03  3:05   ` Kyle Sexton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m21vnuq7pj.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ks@mocker.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).