在emacs lisp中,可以通过run-with-timer
和run-with-async-timer
命令实现伪同步的一种形式。考虑例如以下简单倒数计时器的:Emacs lisp:调试定时器?
(defun -c (i)
(cond
((= i 0) (error "TESTERROR"))
(t
(message "Countdown at %d" i)
(run-with-timer 1 nil '-c (1- i)))))
(-c 3)
运行将显示用信号误差将静默被忽略消息
Countdown at 3
Countdown at 2
Countdown at 1
。
emacs lisp是否有某种方式可以获得此类定时器的错误报告,最好使用完整的堆栈跟踪?
正如sds指出的,这是一个错误(在我看来),我在几个月前在Em中修正了它acs的后备箱。 – Stefan