Re: [Orgmode] Using yasnippet with org Mode
Oliver Charles [EMAIL PROTECTED] writes: Hi, sorry to be a little off topic but... I'm curious to hear what snippets people are using with org-mode. Anyone fancing sharing? The only org-mode specific snippet I use often is the following (for creating blocks in org files) ,[block] | #name : #+begin_...#+end_ | # -- | #+begin_$1 $2 | $0 | #+end_$1 ` I'd be interested to hear others -- Eric ___ 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
[Orgmode] Using yasnippet with 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. ___ 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
Re: [Orgmode] Using yasnippet with org Mode
Ian Barton [EMAIL PROTECTED] writes: ;; 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]))) I think maybe your lambda should not be quoted, try ;; 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]))) -- Eric ___ 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
Re: [Orgmode] Using yasnippet with org Mode
Hi, sorry to be a little off topic but... I'm curious to hear what snippets people are using with org-mode. Anyone fancing sharing? - OLlie On Sun, Nov 23, 2008 at 7:23 PM, Ian Barton [EMAIL PROTECTED] wrote: 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. ___ 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 ___ 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