emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Re: org-src-fontify-natively makes things very, very slow


From: Eric Schulte
Subject: Re: [O] Re: org-src-fontify-natively makes things very, very slow
Date: Mon, 21 Mar 2011 07:57:07 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Le Wang <address@hidden> writes:

> On Mon, Mar 21, 2011 at 3:41 AM, Eric S Fraga <address@hidden> wrote:
>> Le Wang <address@hidden> writes:
>>
>>> Why did you give up on yasnippet?
>>
>> Confusion amongst the key bindings, between org, yasnippet and the
>> autocompletion tools I have been trying.  I want to be able to use TAB
>> for completion.
>>
>> I may come back to yasnippet in due course so it's nothing to do with
>> yasnippet per se.
>

I've been using the following yasnippet/org configuration for a long
while now binding yas/expand to TAB.

#+begin_src emacs-lisp
  (defun yas/org-very-safe-expand ()
    (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))

  (add-hook 'org-mode-hook
            (lambda ()
              ;...
              ;; yasnippet (using the new org-cycle hooks)
              (make-variable-buffer-local 'yas/trigger-key)
              (setq yas/trigger-key [tab])
              (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
              (define-key yas/keymap [tab] 'yas/next-field)
              ))
#+end_src

Best -- Eric

>
> I too had this issue of expansion confusion, especially when I
> installed the premade yasnippet packs.
>
> I solved it by adding moving yasnippet off the [tab] key, and adding
> it to hippie-expand, which I map to (M-/):
>
> (setq yas/trigger-key nil)
> (add-to-list 'hippie-expand-try-functions-list 'yas/hippie-try-expand)
>
>
>> --
>> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
>> : using Org-mode version 7.5 (release_7.5.90.g1fb3.dirty)
>>



reply via email to

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