emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: Using yasnippet with org Mode [Solved]


From: Ian Barton
Subject: Re: [Orgmode] Re: Using yasnippet with org Mode [Solved]
Date: Mon, 24 Nov 2008 14:46:28 +0000
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

As for using yasnippets with tab, the following successfully binds tab
to yas/expand when I start emacs with

  emacs -Q  (skips loading customization)

and then evaluate the following elisp to load yasnippets and org-mode

(load "~/emacs/elisp/util/yasnippet.el")
(yas/initialize)
(yas/load-directory "~/emacs/snippets")
(add-to-list 'load-path "~/emacs/org")
(require 'org)
(add-hook 'org-mode-hook
          (lambda ()
            ;; yasnippet
            (make-variable-buffer-local 'yas/trigger-key)
            (setq yas/trigger-key [tab])
            (define-key yas/keymap [tab] 'yas/next-field-group)))

This works for me using a fairly recent Emacs 23 from cvs.


The answer is:

Make sure you have snippets defined for org-mode. If you want to use
the snippets from text-mode in org-mode, you can make an empty directory
named org-mode in the text-mode directory where you put your text mode
snippets.

--
pluskid

Now working perfectly:)

Ian.





reply via email to

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