emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [BUG] (error "Lisp nesting exceeds `max-lisp-eval-depth'")


From: Sebastien Vauban
Subject: Re: [O] [BUG] (error "Lisp nesting exceeds `max-lisp-eval-depth'")
Date: Tue, 12 Feb 2013 19:55:32 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.93 (windows-nt)

Bastien,

Bastien wrote:
> "Sebastien Vauban" writes:
>
>> After testing: nope, it does not occur when YASnippet is not loaded.
>
> Now that John H. gave me some directions on using yasnippet, I'm ready
> to test further and to hunt your bug.
>
> Would you mind sharing the minimal yas/org config I need to reproduce
> the problem?  Let me insist on minimal :)

Okaayyy, understood! ;-)

#+begin_src emacs-lisp
  (add-to-list 'load-path "~/Public/Repositories/yasnippet")

  ;; Yet Another Snippet extension for Emacs
  (require 'yasnippet)

  ;; root directories that store the snippets
  (setq yas/root-directory nil)
  (let ((my-snippets "~/src/yasnippet/snippets")
        (local-snippets "~/Public/Repositories/yasnippet/snippets"))
    (when (file-directory-p local-snippets)
      (add-to-list 'yas/root-directory local-snippets))
    ;; the first element is always the user-created snippets directory
    (when (file-directory-p my-snippets)
      (add-to-list 'yas/root-directory my-snippets)))

  ;; enable the YASnippet menu and tab-trigger expansion in *all*
  ;; buffers
  (yas/global-mode 1)

  ;; text that will be used in menu to represent the trigger
  (setq yas/trigger-symbol " <tab>")

  ;; allow YASnippet to do its thing in Org files
  (when (fboundp 'yas/expand)

    (defun yas/org-very-safe-expand ()
      (let ((yas/fallback-behavior 'return-nil))
        (yas/expand)))

    (add-hook 'org-mode-hook
              (lambda ()
                (set (make-local-variable 'yas/trigger-key) (kbd "tab")) ;; 
needed?
                (add-to-list 'org-tab-first-hook
                             'yas/org-very-safe-expand)
                (define-key yas/keymap (kbd "tab") 'yas/next-field)))) ;; 
needed?
#+end_src

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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