Suppose I'm writing a function that will compile 4 files (A, B, C, and
D). The first three can compile in any order, but D must come last.
I want the user to have a responsive Emacs while the compilations are
going on.
I could do (call-process "theCompiler" .... "A")
(call-process "theCompiler" .... "B") ...
but then Emacs is "frozen" until all files are compiled.
I could do (start-process ...), but then I can't seem to wait for the
processes to all exit without causing Emacs to hang.
I know that ELisp doesn't do multithreading. Is it possible to do what
I want without creating a separate script outside of Emacs?