emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [BUG] (error "Lisp nesting exceeds `max-lisp-eval-depth'")
Date: Tue, 12 Feb 2013 19:55:32 +0100	[thread overview]
Message-ID: <86liatjra3.fsf@somewhere.org> (raw)
In-Reply-To: 87a9r9h1dm.fsf@bzg.ath.cx

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	other threads:[~2013-02-12 18:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12  9:07 [BUG] (error "Lisp nesting exceeds `max-lisp-eval-depth'") Sebastien Vauban
2013-02-12 10:48 ` Bastien
2013-02-12 17:41   ` Sebastien Vauban
2013-02-12 17:45     ` Bastien
2013-02-12 18:55       ` Sebastien Vauban [this message]
2013-02-13 10:09 ` Christopher Schmidt
2013-02-13 10:31   ` Sebastien Vauban
2013-02-13 11:38     ` Christopher Schmidt
2013-02-13 13:10       ` Sebastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86liatjra3.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).