Getting a list of running Emacs timers

扶醉桌前 提交于 2019-12-09 05:04:22

问题


I've created a timer and stored a reference to it in Emacs with

(setq my-timer-store (run-at-time "1 min" 900 'my-func))

I usually execute this elisp in the morning and then stop it from running overnight by executing

(cancel-timer my-timer-store)

Unfortunately I started the timer twice (without cancelling it in between) so I no longer have a reference to the first one I started and therefore I can't cancel it. Is there a way of listing all the running timers so I can clean up the one I left running.


回答1:


The timers seem to be stored in timer-list and timer-idle-list.



来源:https://stackoverflow.com/questions/11670567/getting-a-list-of-running-emacs-timers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!