Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to kill a process within spacemacs

I recently felt the need to work with Spacemacs for my erlang/elixir projects. (was coding Erlang on eclipse).

Now i'm feeling a bit more comfortable with Spacemacs, i have a question regarding how to deal with processes.

I made a mistake on my code and had an infinite loop. I killed it on console but i was wondering how to do the same thing within spacemacs. I've found that SPC a p gave me the possibility to list all the running processes.

Can please someone explain me (i'm a complete beginner on spacemacs/emacs) if it is possible to kill a running process within this menu ?

Regards

Pierre

like image 254
Tanc Avatar asked Jul 06 '16 09:07

Tanc


People also ask

How do I kill a process in Emacs?

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 .

How do you close a buffer in Spacemacs?

Use kill-buffer-and-window to close a buffer and its window. But this will keep emacs running. If you also want to kill emacs (the equivalent of :q ) then try evil-quit-all if you're using evil, and save-buffers-kill-terminal for standard emacs quit.


2 Answers

M-x proced

Choose your line and then k

like image 144
djangoliv Avatar answered Sep 18 '22 03:09

djangoliv


In Spacemacs, SPC a p, which runs the command list-processes, opens a buffer showing only those processes started by Spacemacs.

The list process buffer is evilified, so j and k navigate the list of processes,

d in the list process buffer will immediately delete the process under the cursor (no prompt to confirm is given, so ensure its what you want to do).

q will quit the process list and close the buffer.

Note: SPC a P will list all operating system processes, not just those spawned by Spacemacs.

Reference: https://practicalli.github.io/spacemacs/install-spacemacs/troubleshooting.html

like image 33
jr0cket Avatar answered Sep 18 '22 03:09

jr0cket