What is the correct way to run multiple
async-shell-command invocations serially?
For example, this will execute all at once.
(progn (async-shell-command "echo 1; sleep 1") (async-shell-command "echo 2; sleep 1") (async-shell-command "echo 3; sleep 1"))
But I want each command to wait for the command before it to finish first. (Of course in this case you can just chain them together with bash and
&&, but you might like to have different output buffers, etc.) And I don't want to make the user wait, which is why I don't use UI-blocking
The only way I've figured out how to do this is with sentinels and continuation passing, which is very ugly.