From time to time I happen to M-! some_command
just to find that the command runs longer than I expected and keeps my emacs frozen for long seconds. So I glaze at my frozen emacs and kick myself for not using M-& some_command
and promise myself to use M-&
next time. But M-!
is in my muscle memory for decades…
And of course there is Ctrl-G
, but there are cases when breaking command and re-running it is not preferable (mayhaps it may break sth, mayhaps would be costly to rerun…).
Similar mistake in shell konsole is trivial to correct, Ctrl-Z
, bg
and job is running in the background.
Does there exist some similar trick in emacs - a way to turn currently running foreground (synchronous) command into backgroundized (asynchronous) one?
Note: in case it is impossible for default M-!
, I am open to suggestions of how to rebind M-!
into something else (what would be functionally equivalent apart from this trick).