【发布时间】:2020-05-21 02:47:15
【问题描述】:
我有一组简单的 emacs lisp 行,用于插入我的姓名首字母和时间/日期戳,但这在某些模式下已停止工作(例如,python 模式)。在这些模式下,它会抛出错误comint-send-string: Buffer *spam* has no process,其中“垃圾邮件”是我尝试添加时间戳的缓冲区。
lisp 行是:
(defun msl-insert-datetime () (interactive) (insert (format-time-string "%Y-%m-%d %H:%M ABC: ")))
(global-set-key [(control c)(control d)] 'msl-insert-datetime)
这适用于各种模式(文本模式、lisp 模式等)的缓冲区,插入类似2020-05-20 21:44 ABC: 的内容。但是在 Python 模式下(我的大部分编程工作都是在其中),我得到了上面的消息。
欢迎提出任何建议!我在 Ubuntu 20.04 上运行 Emacs 26.3 (build 2)。
【问题讨论】: