Lisp error: (error "Lisp nesting exceeds `max-lisp-eval-depth'") when using cl- functions

2

1

I recently moved computers and upgraded to Emacs 24.3 (from 24.2) yesterday. Since then, I have been receiving what is essentially a stack-overflow error:

Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
  position(...)
  apply(position ...)
  position(...)
  apply(position ...)

  position(nil (#<buffer ssa.org> #<buffer  *Minibuf-1*> #<buffer  *Minibuf-0*> #<buffer  *code-conversion-work*> #<buffer  *Echo Area 0*> #<buffer  *Echo Area 1*> #<buffer  *doc-view conversion output*> #<buffer  *autoload*> #<buffer  *canonical address*> #<buffer  *extract address components*> #<buffer *Messages*>) :if #[(buf) "rq\210 \203\n    =\2051\306!\f\232\2051\307\310\311
!\"\312 \313\314\315#,)\207" [buf mode major-mode default-directory topdir name expand-file-name format "^%s\\(?:<[0-9]+>\\)?$" regexp-quote buffer-name nil t string-match start string regexp inhibit-changing-match-data] 4])
  apply(position nil (#<buffer ssa.org> #<buffer  *Minibuf-1*> #<buffer  *Minibuf-0*> #<buffer  *code-conversion-work*> #<buffer  *Echo Area 0*> #<buffer  *Echo Area 1*> #<buffer  *doc-view conversion output*> #<buffer  *autoload*> #<buffer  *canonical address*> #<buffer  *extract address components*> #<buffer *Messages*>) (:if #[(buf) "rq\210  \203\n    =\2051\306!\f\232\2051\307\310\311
!\"\312 \313\314\315#,)\207" [buf mode major-mode default-directory topdir name expand-file-name format "^%s\\(?:<[0-9]+>\\)?$" regexp-quote buffer-name nil t string-match start string regexp inhibit-changing-match-data] 4]))

  ...
  ...
  ...

  position(...)
  apply(position ...)
  position(...)
  apply(position ...)
  cl-position(...)
  apply(cl-position ...)
  cl-find(...)
  apply(cl-find ...)
  cl-find-if(...)
  magit-mode-get-buffer("*magit: %t*" magit-status-mode nil t)
  magit-mode-get-buffer-create("*magit: %t*" magit-status-mode)
  magit-mode-display-buffer("*magit: %t*" magit-status-mode pop-to-buffer)
  magit-status("/Users/sean/Dropbox/smp/")
  call-interactively(magit-status)
  (lambda nil (interactive) (call-interactively (quote magit-status)))()
  call-interactively((lambda nil (interactive) (call-interactively (quote magit-status))) nil nil)

I suspect that this is an issue with the cl bundle in 24.3 as I have seen this recently in a different package (though I cannot remember which).

  • Is this a common problem when upgrading?
  • What can I do to resolve this?

The full log file (kind of huge) is available here for anyone who wishes to inspect it, but I hope that I have inlined the necessary details in this post.

Sean Allred

Posted 2014-02-25T21:34:23.140

Reputation: 910

Answers

2

This looks like a problem with a circular definition.

I think the problem is that you compiled magit with the previous version of emacs; you should recompile magit with the new emacs and the problem will disappear.

sds

Posted 2014-02-25T21:34:23.140

Reputation: 1 600

Deleting both cl-lib and magit, closing emacs, re-opening and re-installing magit (only) did the trick. Thanks! – Sean Allred – 2014-02-26T03:01:21.997

4

I suppose this is cl-lib problem. If you already installed cl-lib via package.el, you should uninstall cl-lib and try again. Emacs 24.3 bundles cl-lib.el. cl-lib package is for older Emacs(< 24.3).

syohex

Posted 2014-02-25T21:34:23.140

Reputation: 141

1I just wanted to say thank you for this answer—it was still pretty instrumental in resolving :) I only accepted the other answer because it gave a why (and because I never would have thought I needed to re-install magit for this). I regret that I have but one upvote to give! – Sean Allred – 2014-02-26T03:05:29.767