views:

260

answers:

1

I've been randomly getting the following error in emacs:

Variable binding depth exceeds max-specpdl-size

...and I've been getting it at very random moments. After researching this, it seems as though some elisp somewhere is recursing too deeply. Are there any strategies for tracking this down? I'm totally at a loss as far as what is actually causing this.

I've gotten some errors indicating something along the lines of infinite recursion with ropemacs (but these are usually Python errors). Could something be misconfigured with ropemacs?

Update: Interestingly enough, I've found that I always get this error if I do a "C-h a" for "speedbar" but not for "rope-".

+4  A: 

To track the problem down, you can try this:

(setq max-specpdl-size 5)  ; default is 1000, reduce the backtrace level
(setq debug-on-error t)    ; now you should get a backtrace
C-h a ; in speedbar

You should get a backtrace upon the error, and at that point, you can track down the offending routine.

I'd also try loading emacs w/out your configuration file (emacs -q), to see if there's something in your .emacs that is affecting things. (I don't get the infinite loop using C-h a). And if it is your .emacs, then the best way I've found to track that down is either binary search (put an error (error "frog") or somesuch in the middle of your .emacs, load, test, if no problems, put the error at 3/4, otherwise at 1/4, repeat...), or manually evaluate your .emacs line by line (region by region), testing after each portion. Those settings should help.

Trey Jackson
fixed a typo...hope you don't mind.
seth
Of course not. Wish SO had a 'diff' utility while editing, I wanted to see where I mussed up.
Trey Jackson
You had `debug-on-errot`.If you click on the link next to edited (e.g. '5 hours ago') above my gravatar, you can see the diff. Or do you mean something different?
seth