问题描述
如何在Emacs中杀死一个内部进程?例如我运行 Mx shell
。 我可以使用 Mx list-但是如何从这个列表中删除一个进程?
没有默认的键绑定为了这;然而,请参阅pjammer的答案 - list-processes +
包括(除其他外)在之间的杀死绑定 - 还有Joao Tavora的答案 - 提供了一个杀死绑定(对于相同的密钥)。
event_jr指出您可以使用 (kill-process)
以终止当前缓冲区的进程。
<更一般地说:您可以使用
(kill-process PROCESS)
,其中 PROCESS
可能是进程,缓冲区或进程或缓冲区的名称,这些名称与出现在 list-processes的输出中
。如果碰巧有冲突,进程名称优先于缓冲区名称;所以最好是提供流程名称的习惯。 或者,Emacs 23+有一个通用的系统进程管理器( Mx过程
),它更像运行 top
,并且具有用于发送(任意)信号的默认绑定( -- and also Joao Tavora's answer -- which provides just a kill binding (for the same key).
event_jr points out in the comments that you can use (kill-process)
to kill the current buffer's process.
More generally: You can use (kill-process PROCESS)
, where PROCESS
"may be a process, a buffer, or the name of a process or buffer", with those names being as they appear in the output of list-processes
. Process names take precedence over buffer names, should you happen to have a conflict; so it's probably best to be in the habit of supplying the process name.
Alternatively, Emacs 23+ has a general system process manager (M-x proced
) which is more akin to running top
, and which does have a default binding for sending (arbitrary) signals (). Of course it may be far less obvious in that listing which process you're interested in.
这篇关于Emacs,内部进程杀死,任何命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!