1

When using M-x list-processes I get a list of processes.

Is there a way to kill them interactively ? For instance by selecting one in the list, then pressing q or something similar ?

In case it matters, I am using emacs 24.5.1 on osx with emacs prelude.

Note : it is different from this question I want to do it interactively, not from the mini-buffer (as understood by @legoscia already).

Community
  • 1
  • 1
nha
  • 17,623
  • 13
  • 87
  • 133
  • http://www.emacswiki.org/emacs/list-processes+.el – tripleee Jul 21 '15 at 12:01
  • possible duplicate of [Emacs, internal process killing, any command?](http://stackoverflow.com/questions/10627289/emacs-internal-process-killing-any-command) – Jay Jul 21 '15 at 12:04
  • @triplee list-processes looks interesting. Are you using it ? Is it on melpa or another repository ? – nha Jul 21 '15 at 12:10

1 Answers1

3

In Emacs 25, you can do what you'd expect: in the process list, hit d to "delete" the process under point.


For earlier Emacs versions, I've been using this little function that works using the minibuffer, not the process list:

(defun delete-process-i(p)
  (interactive `(,(completing-read"Kill proc: "(mapcar 'process-name(process-list))()t)))
  (delete-process p))

After defining it, you can type M-x delete-process-i, and type the name of the process you want to kill, with tab completion.

(I originally wrote it to fit in 140 characters; thus the non-standard layout.)

legoscia
  • 39,593
  • 22
  • 116
  • 167