emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] (error "Lisp nesting exceeds `max-lisp-eval-depth'")
@ 2013-02-12  9:07 Sebastien Vauban
  2013-02-12 10:48 ` Bastien
  2013-02-13 10:09 ` Christopher Schmidt
  0 siblings, 2 replies; 9+ messages in thread
From: Sebastien Vauban @ 2013-02-12  9:07 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Since the last pull I made, I can't expand anymore BBDB aliases in Gnus...
because of Org!

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
  yas--all-parents(text-mode)
  (lambda (mode) (yas--all-parents mode))(text-mode)
  mapcar((lambda (mode) (yas--all-parents mode)) (text-mode message-mode))
  cl-mapcar((lambda (mode) (yas--all-parents mode)) (text-mode message-mode))
  apply(cl-mapcar (lambda (mode) (yas--all-parents mode)) (text-mode message-mode) nil)
  mapcan((lambda (mode) (yas--all-parents mode)) (text-mode message-mode))
  (append modes-to-activate (mapcan (function (lambda (mode) (yas--all-parents mode))) modes-to-activate))
  (remove-duplicates (append modes-to-activate (mapcan (function (lambda (mode) (yas--all-parents mode))) modes-to-activate)))
  (let ((modes-to-activate (list major-mode)) (mode major-mode)) (while (setq mode (get mode (quote derived-mode-parent))) (setq modes-to-activate (cons mode modes-to-activate))) (progn (let ((--dolist-tail-- (yas-extra-modes)) mode) (while --dolist-tail-- (setq mode (car --dolist-tail--)) (setq modes-to-activate (cons mode modes-to-activate)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (remove-duplicates (append modes-to-activate (mapcan (function (lambda (mode) (yas--all-parents mode))) modes-to-activate))))
  yas--modes-to-activate()
  (mapcar (function (lambda (mode-name) (gethash mode-name yas--tables))) (yas--modes-to-activate))
  (remove nil (mapcar (function (lambda (mode-name) (gethash mode-name yas--tables))) (yas--modes-to-activate)))
  yas--get-snippet-tables()
  (mapcan (function (lambda (table) (yas--fetch table (buffer-substring-no-properties start end)))) (yas--get-snippet-tables))
  (setq templates (mapcan (function (lambda (table) (yas--fetch table (buffer-substring-no-properties start end)))) (yas--get-snippet-tables)))
  (while (and (not done) syntaxes) (setq syntax (car syntaxes)) (setq syntaxes (cdr syntaxes)) (save-excursion (skip-syntax-backward syntax) (setq start (point))) (setq templates (mapcan (function (lambda (table) (yas--fetch table (buffer-substring-no-properties start end)))) (yas--get-snippet-tables))) (if templates (setq done t) (setq start end)))
  (let ((start (point)) (end (point)) (syntaxes yas-key-syntaxes) syntax done templates) (while (and (not done) syntaxes) (setq syntax (car syntaxes)) (setq syntaxes (cdr syntaxes)) (save-excursion (skip-syntax-backward syntax) (setq start (point))) (setq templates (mapcan (function (lambda (table) (yas--fetch table (buffer-substring-no-properties start end)))) (yas--get-snippet-tables))) (if templates (setq done t) (setq start end))) (list templates start end))
  yas--current-key()
  (if field (save-restriction (narrow-to-region (yas--field-start field) (yas--field-end field)) (yas--current-key)) (yas--current-key))
  (setq templates-and-pos (if field (save-restriction (narrow-to-region (yas--field-start field) (yas--field-end field)) (yas--current-key)) (yas--current-key)))
  (if (and yas-expand-only-for-last-commands (not (member last-command yas-expand-only-for-last-commands))) nil (setq templates-and-pos (if field (save-restriction (narrow-to-region (yas--field-start field) (yas--field-end field)) (yas--current-key)) (yas--current-key))))
  (let (templates-and-pos) (if (and yas-expand-only-for-last-commands (not (member last-command yas-expand-only-for-last-commands))) nil (setq templates-and-pos (if field (save-restriction (narrow-to-region (yas--field-start field) (yas--field-end field)) (yas--current-key)) (yas--current-key)))) (if (and templates-and-pos (first templates-and-pos)) (yas--expand-or-prompt-for-template (first templates-and-pos) (second templates-and-pos) (car (cdr (cdr templates-and-pos)))) (yas--fallback (quote trigger-key))))
  yas-expand()
  call-interactively(yas-expand)
  (if (keymapp binding) (set-temporary-overlay-map binding) (call-interactively (or binding (quote orgstruct-error))))
  (let ((binding (let ((orgstruct-mode)) (key-binding "	")))) (if (keymapp binding) (set-temporary-overlay-map binding) (call-interactively (or binding (quote orgstruct-error)))))
  (if (let* ((org-heading-regexp (concat "^" orgstruct-heading-prefix-regexp "\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ 	]*$")) (org-outline-regexp (concat orgstruct-heading-prefix-regexp "\\*+ ")) (org-outline-regexp-bol (concat "^" org-outline-regexp)) (outline-regexp org-outline-regexp) (outline-heading-end-regexp "\n") (outline-level (quote outline-level)) (outline-heading-alist)) (when (org-context-p (quote headline) (quote item) nil) (org-run-like-in-org-mode (quote org-cycle)) t)) nil (let ((binding (let ((orgstruct-mode)) (key-binding "	")))) (if (keymapp binding) (set-temporary-overlay-map binding) (call-interactively (or binding (quote orgstruct-error))))))
  (unless (let* ((org-heading-regexp (concat "^" orgstruct-heading-prefix-regexp "\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ 	]*$")) (org-outline-regexp (concat orgstruct-heading-prefix-regexp "\\*+ ")) (org-outline-regexp-bol (concat "^" org-outline-regexp)) (outline-regexp org-outline-regexp) (outline-heading-end-regexp "\n") (outline-level (quote outline-level)) (outline-heading-alist)) (when (org-context-p (quote headline) (quote item) nil) (org-run-like-in-org-mode (quote org-cycle)) t)) (let ((binding (let ((orgstruct-mode)) (key-binding "	")))) (if (keymapp binding) (set-temporary-overlay-map binding) (call-interactively (or binding (quote orgstruct-error))))))
  orgstruct-hijacker-org-cycle(1)
  call-interactively(orgstruct-hijacker-org-cycle)
  (let* ((beyond-yasnippet (yas--keybinding-beyond-yasnippet))) (yas--message 4 "Falling back to %s" beyond-yasnippet) (progn (or (or (null beyond-yasnippet) (commandp beyond-yasnippet)) (signal (quote cl-assertion-failed) (list (quote (or (null beyond-yasnippet) (commandp beyond-yasnippet)))))) nil) (setq this-original-command beyond-yasnippet) (call-interactively beyond-yasnippet))
  (cond ((eq yas-fallback-behavior (quote return-nil)) nil) ((eq yas-fallback-behavior (quote call-other-command)) (let* ((beyond-yasnippet (yas--keybinding-beyond-yasnippet))) (yas--message 4 "Falling back to %s" beyond-yasnippet) (progn (or (or (null beyond-yasnippet) (commandp beyond-yasnippet)) (signal (quote cl-assertion-failed) (list (quote ...)))) nil) (setq this-original-command beyond-yasnippet) (call-interactively beyond-yasnippet))) ((and (listp yas-fallback-behavior) (cdr yas-fallback-behavior) (eq (quote apply) (car yas-fallback-behavior))) (if (cddr yas-fallback-behavior) (apply (cadr yas-fallback-behavior) (cddr yas-fallback-behavior)) (if (commandp (cadr yas-fallback-behavior)) (progn (setq this-command (cadr yas-fallback-behavior)) (call-interactively (cadr yas-fallback-be
 havior)))))) (t nil))
  yas--fallback(trigger-key)
  (if (and templates-and-pos (first templates-and-pos)) (yas--expand-or-prompt-for-template (first templates-and-pos) (second templates-and-pos) (car (cdr (cdr templates-and-pos)))) (yas--fallback (quote trigger-key)))
  (let (templates-and-pos) (if (and yas-expand-only-for-last-commands (not (member last-command yas-expand-only-for-last-commands))) nil (setq templates-and-pos (if field (save-restriction (narrow-to-region (yas--field-start field) (yas--field-end field)) (yas--current-key)) (yas--current-key)))) (if (and templates-and-pos (first templates-and-pos)) (yas--expand-or-prompt-for-template (first templates-and-pos) (second templates-and-pos) (car (cdr (cdr templates-and-pos)))) (yas--fallback (quote trigger-key))))
  yas-expand()
  call-interactively(yas-expand)

  [... many repeated blocks ...]

  call-interactively(yas-expand)
  (let (orgtbl-mode) (call-interactively (or (key-binding [(tab)]) (key-binding "	") (quote orgtbl-error))))
  (if (org-at-table-p) (call-interactively (quote orgtbl-tab)) (let (orgtbl-mode) (call-interactively (or (key-binding [(tab)]) (key-binding "	") (quote orgtbl-error)))))
  orgtbl-hijacker-command-102(1)
  call-interactively(orgtbl-hijacker-command-102 nil nil)
--8<---------------cut here---------------end--------------->8---

Note that Org is plugged into Message mode:

--8<---------------cut here---------------start------------->8---
  (defun my/message-mode-hook ()
    (local-set-key (kbd "<M-tab>") 'mail-abbrev-complete-alias)
    (turn-on-auto-fill)
    (turn-on-orgtbl)
    (turn-on-orgstruct++)
    (when (try-require 'org-footnote)
      (set (make-local-variable 'org-footnote-auto-label) 'plain)
      (set (make-local-variable
      'org-footnote-tag-for-non-org-mode-files) nil)))

  (add-hook 'message-mode-hook 'my/message-mode-hook)
--8<---------------cut here---------------end--------------->8---

Hence, the link between Org and BBDB <TAB> expansion...

I've bisected, and found out that:

--8<---------------cut here---------------start------------->8---
a3f6570fffcfc1b1880b646cfabdf2a6f8187956 is the first bad commit
commit a3f6570fffcfc1b1880b646cfabdf2a6f8187956
Author: Christopher Schmidt <christopher-TsugTnnrXQtNhJN0HIYqWA@public.gmane.org>
Date:   Sun Feb 10 18:46:57 2013 +0100

    Allow a custom headline prefix in orgstruct-mode.

    * lisp/org.el (org-cycle-global-status)
    (org-cycle-subtree-status): Set state property.
    (org-heading-components): Use org-heading-regexp in
    orgstruct-mode.
    (orgstruct-heading-prefix-regexp, orgstruct-setup-hook): New
    options.
    (orgstruct-initialized): New variable.
    (orgstruct-mode): Simplify implementation.
    (orgstruct-setup): Simplify implementation.  Translate keys to
    their most general equivalent.
    (orgstruct-make-binding): Generate index on the fly.  Discard
    alternative keys.  Bind variables according to
    orgstruct-heading-prefix-regexp.
    (org-get-local-variables): Honour state property.
    (org-run-like-in-org-mode): Do not override variables with
    non-default values.
    (org-forward-heading-same-level): Do not skip to headlines on
    another level.  Handle negative prefix argument correctly.
    (org-backward-heading-same-level): Use
    org-forward-heading-same-level.
--8<---------------cut here---------------end--------------->8---

Effectively, when checking out commit ba38de1 (last good commit), everything
works again like expected.

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-02-13 13:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).