emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Using yasnippet with org Mode
@ 2008-11-23 19:23 Ian Barton
  2008-11-23 21:11 ` Eric Schulte
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Ian Barton @ 2008-11-23 19:23 UTC (permalink / raw)
  To: emacs-orgmode Org-Mode

Someone on the list mentioned yasnippet a while ago. I have been trying 
it out and I like it. However, I can't get it to play nicely with org 
mode. I have read various fixes, but none seem to work for me. To 
summarize what I have done:

In my .emacs:

(require 'org-install)

;; Yasnippet
(add-to-list 'load-path "~/.emacs-lisp/plugins")
(require 'yasnippet)
(add-to-list 'yas/extra-mode-hooks
              'python-mode-hook)
(yas/initialize)
(yas/load-directory "~/.emacs-lisp/snippets/")

;; Make Yasnippet play nicely with org mode.
(add-hook 'org-mode-hook
'(lambda ()
(make-variable-buffer-local 'yas/trigger-key)
(setq yas/trigger-key [tab])))

When I run C-h k I get:

<tab> runs the command yas/expand
   which is an interactive Lisp function in `yasnippet.el'.
It is bound to <tab>, TAB.
(yas/expand)

Expand a snippet.

I can see yas in my status line when I open an org file and using tab 
with yasnippet works fine in other text mode files. I think that I am 
probably missing something obvious, as other people can get it to work.

Ian.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-09-22 19:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-23 19:23 Using yasnippet with org Mode Ian Barton
2008-11-23 21:11 ` Eric Schulte
2008-11-23 21:17   ` Tassilo Horn
2008-11-23 22:43     ` Eric Schulte
2008-11-24  9:34       ` Ian Barton
2008-11-24 23:51         ` Sebastian Rose
2008-11-24 14:46       ` Re: Using yasnippet with org Mode [Solved] Ian Barton
2008-11-24 15:38       ` Re: Using yasnippet with org Mode Eric Schulte
2008-11-24  0:45 ` Oliver Charles
2008-11-24 15:40   ` Eric Schulte
2008-11-25 15:44     ` Org mode snippets WAS: " Jonathan Arkell
2009-09-19  5:06 ` Using yasnippet with org Mode (C-i works TAB doesn't) Jeff Kowalczyk
2009-09-19 13:03   ` Nicolas Goaziou
2009-09-20 14:16     ` Eric Schulte
2009-09-21 17:18       ` Carsten Dominik
2009-09-22 15:52         ` Nicolas Goaziou
2009-09-22 19:22         ` Eric Schulte
2009-09-19 13:46   ` Eric Schulte

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).