1

我知道这个解决方案已发布,但我找不到它。我在我的 .emacs 代码中有在 n 秒后自动终止建议缓冲区(我的设置为 5)。这使我不必切换到该窗格并杀死它或打开 90 个自动完成或建议缓冲区。我再也找不到代码了。有人知道怎么做这个吗?

谢谢

4

2 回答 2

1

试试Midnight Mode,它包含在最新版本的 Emacs 中。

于 2013-02-01T23:31:10.703 回答
0
(run-with-idle-timer SECS REPEAT 'x-function)


Perform an action the next time Emacs is idle for SECS seconds.
The action is to call FUNCTION with arguments ARGS.
SECS may be an integer, a floating point number, or the internal
time format returned by, e.g., `current-idle-time'.
If Emacs is currently idle, and has been idle for N seconds (N < SECS),
then it will call FUNCTION in SECS - N seconds from now.

If REPEAT is non-nil, do the action each time Emacs has been idle for
exactly SECS seconds (that is, only once for each time Emacs becomes idle).

你定义一个函数 x-function 来杀死你想要的缓冲区。

于 2013-02-03T16:27:24.107 回答