Emacs,内部进程杀死,任何命令? [英] Emacs, internal process killing, any command?

查看:130
本文介绍了Emacs,内部进程杀死,任何命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Emacs中杀死一个内部进程?例如我运行 Mx shell



我可以使用 Mx list-但是如何从这个列表中删除一个进程?

解决方案

没有默认的键绑定为了这;然而,请参阅pjammer的答案 - list-processes + 包括(除其他外)在 Ck 之间的杀死绑定 - 还有Joao Tavora的答案 - 提供了一个杀死绑定(对于相同的密钥)。



event_jr指出您可以使用 M - : (kill-process) RET 以终止当前缓冲区的进程。



<更一般地说:您可以使用 M - : (kill-process PROCESS) RET ,其中 PROCESS 可能是进程,缓冲区或进程或缓冲区的名称,这些名称与出现在 list-processes的输出中。如果碰巧有冲突,进程名称优先于缓冲区名称;所以最好是提供流程名称的习惯。



或者,Emacs 23+有一个通用的系统进程管理器( Mx过程),它更像运行 top ,并且具有用于发送(任意)信号的默认绑定( k )。当然,这可能不太明显,在列出你感兴趣的程序。


How to kill an internal process in Emacs? For example I run M-x shell.

I can check running processes with M-x list-processes but how can I kill a process from this list?

解决方案

There is no default key binding for this; however see pjammer's answer -- list-processes+ includes (among other things) a kill binding on C-k -- 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 M-: (kill-process) RET to kill the current buffer's process.

More generally: You can use M-: (kill-process PROCESS) RET, 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 (k). Of course it may be far less obvious in that listing which process you're interested in.

这篇关于Emacs,内部进程杀死,任何命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆