1

How do you abort an emacs M-x compile compilation? I'm editing a bash file, and I "test execute it" by doing M-x compile.

What I tried - googled:emacs abort compilation

The file I'm working on is like this

#!/bin/bash                                                                                                      
# -*- compile-command: "./spawn.sh" -*-                                                                          
set -e
# Function definitions 
# more ....
  • Your question title mentions M-x compile but your question itself says nothing about using that. – Drew Dec 25 '17 at 17:22
1

Know that you can use M-x compile to compile from within Emacs.

If you do that then, in your compilation output buffer, use C-h m to see information about the mode.

For example, it might tell you that the mode is compilation-mode and that C-c C-k is bound to command kill-compilation. Clicking that command name tells you:

Kill the process made by the M-x compile or M-x grep commands.

Similarly, if you are in compilation-minor-mode, where you learn that kill-compilation is bound to K, as well as to C-c C-k.

If you use library help-fns+.el then you can use C-h M-k followed by a keymap name (e.g. compilation-mode-map or compilation-minor-mode-map), to see all of the keys bound by that keymap.

So at least if you launch your compilation from within Emacs you can kill it using K or C-c C-k.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.