追踪 emacs 中的 max-specpdl-size 错误
我在 emacs 中随机遇到以下错误:
变量绑定深度超过 max-specpdl-size
...并且我在非常随机的时刻得到它。经过研究后,似乎某个地方的某些 elisp 递归得太深了。有什么策略可以追踪这个问题吗?我完全不知道到底是什么原因造成的。
我收到了一些错误,表明一些与 Ropemacs 的无限递归类似的错误(但这些通常是 Python 错误)。是否有可能 Ropemacs 配置错误?
更新:有趣的是,我发现如果我对“speedbar”执行“Ch a”而不是对“rope-”执行“Cha a”,我总是会收到此错误。
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-".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要跟踪问题,您可以尝试以下操作:
您应该对错误进行回溯,此时您可以跟踪有问题的例程。
我还尝试在没有配置文件的情况下加载 emacs (
emacs -q
),以查看 .emacs 中是否有某些内容会影响某些内容。 (我没有使用Ch a
获得无限循环)。如果它是你的 .emacs,那么我发现追踪它的最好方法是二分搜索(在你的 .emacs 中间放置一个错误(error "frog")
或类似的东西) ,加载,测试,如果没有问题,将错误放在 3/4,否则放在 1/4,重复...),或者手动逐行评估您的 .emacs(逐个区域),在每个部分之后进行测试。这些设置应该有帮助。To track the problem down, you can try this:
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 usingC-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.对我来说也不起作用。我发现 Ch+v 实际上
max-specpdl-size
根本没有被更改为5
setq
。然后我尝试与 Mxset-variable
交互设置它。这也没有改变它的价值。最后我设法用 Mxcustomize-variable
设置它。顺便说一句,在我的系统上,max-specpdl-size 是 140,因此太小了。我必须将其增加到 1000,不是为了获得回溯并对其进行调试,而是为了使其正常工作。
For me too it did not work. I found with C-h+v that actually
max-specpdl-size
was not changed to5
at all by thesetq
. I then tried to set it interactively with M-xset-variable
. That too did not change its value. Finally I managed to set it with M-xcustomize-variable
.Btw, on my system
max-specpdl-size
was140
and thus to small. I had to increase it to1000
, not in order to get a backtrace and debug it, but to make it work.报告发布 10 年后,这种错误仍然存在于 XEmacs 21.4(补丁 24)“标准 C”[Lucid](x86_64-linux-gnu、Mule)中。我从 Mx vm 获取它(尝试阅读我的电子邮件,我每天都会这样做很多次)。
一个粗略的解决方法是退出 XEmacs 并重新开始。仅退出并重新启动虚拟机没有帮助。
The kind of bug still exists 10 years after the report, in XEmacs 21.4 (patch 24) "Standard C" [Lucid] (x86_64-linux-gnu, Mule). I get it from M-x vm (trying to read my e-mail, which I do many times every day).
A crude work-around is quitting XEmacs and starting all over. Only quitting and re-starting vm does not help.