【问题标题】:SLIME who-calls errors out with 'nesting exceeds max-lisp-eval-depth'SLIME who-calls 错误,“嵌套超过 max-lisp-eval-depth”
【发布时间】:2016-02-07 11:22:32
【问题描述】:

使用 Spacemacs 0.105,更新所有包。

在符号上使用 Slime 的 who-calls 时会出现nesting exceeds max-lisp-eval-depth 错误。

我试过用

设置评估深度
(setq max-lisp-eval-depth 10000)

然后给我这个错误:Variable binding depth exceeds max-specpdl-size

然后我也尝试设置它

(setq max-specpdl-size 32000)

这又给了我评估深度错误,所以它只是在转圈。

有什么想法吗?

【问题讨论】:

  • 出现错误,设置 max-lisp-eval-depth 无济于事。您需要找到并修复错误。假设有一个无限递归,将 eval 深度设置为无穷大仍然无济于事。
  • 我尝试在许多其他代码库上运行who-calls,不仅仅是我的,错误仍然存​​在。我什至尝试了(defun fun-1 () (fun-2)) (defun fun-2 () '1) 并在fun-2 上运行who-calls,它只是出错了。
  • 所以这似乎与 Spacemacs 有关,因为运行我的旧 init 文件可以使命令工作。我会和他们一起提出来的。

标签: emacs lisp common-lisp slime spacemacs


【解决方案1】:

我用我的 emacs 和 slime 试过这个

您建议的功能代码是:

(defun fun-1 () (fun-2)) 

(defun fun-2 () '1)

然后将光标放在每个函数之后,然后按 C-x C-e

你评估这个表达式

那么你正在寻找的功能是 slime-who-calls

M-x slime-who-calls [ret]

输入 fun-2

它会用这个打开一个新的缓冲区

(No location)
  FUN-1

添加捕获

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多