[Top][All Lists]

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

Re: [External] : `max-specpdl-size' and `max-lisp-eval-depth'

From: Hongyi Zhao
Subject: Re: [External] : `max-specpdl-size' and `max-lisp-eval-depth'
Date: Sun, 26 Sep 2021 15:09:33 +0800

On Sun, Sep 26, 2021 at 11:53 AM Drew Adams <> wrote:
> > I noticed the following messages triggered frequently by Emacs:
> >
> > File mode specification error: (error Variable binding depth exceeds
> > max-specpdl-size)
> > Emacs: nesting exceeds `max-lisp-eval-depth'
> >
> > Any hints/suggestions or rule of thumb to set these variables?
> You generally shouldn't need to change them.
> You're likely coding an infinite recursion, so
> the stack overflows.  Check your code - or
> narrow the problem down to some bit of code
> and post it here, if you can't see how/why
> you've cause an infinite recursion.

I set the following line in ~/.emacs.d/init.el:

(setq debug-on-error t)

Then a python file with the following content is opened in Emacs:

import matplotlib.pyplot as plt
from numpy import arange, p(*)i, sin
from sympy import Symbol, integrate

t = arange(0, 2*pi, .01)
plt.plot(sin(4*t), sin(5*t))

x = Symbol('x')

Now, I put point on `p' of `pi', denoted by * above. And hit
`M-.' which runs the command xref-find-definitions. The error shown in
the attachment will be triggered. When I hit the `M-.' for the second
time, it will be executed successfully.

Regards, HZ

Attachment: max-specpdl-size.png
Description: PNG image

reply via email to

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