When I’m using M-x compile to do parallel compilation with make -jn for a multi (level) dir project, when I got an error, I can’t get to the correct place with next-error stuff. Emacs always goes to wrong directory for the problematic file. But I have no problem if I just do it without -jn.
When I’m using M-x compile to do parallel compilation with make -jn for a
Share
next-erroruses the text output of your compilation to determine where to go. But with parallel compilation, this text output can be corrupted, and even if it is not corrupted it can and often is ambiguous (think of one task compiling foo/bar and the other task compiling toto/titi, and the output looking like “entering directory foo; entering directory toto; error in bar:20; error in titi:69”).I can only think of the following ways to solve this problem:
compile.elso that when looking for “bar”, it fetches it in all the directories that have been mentioned before.This last change would probably be a good one (i.e. patch welcome), but note that it would still bump into problems if “bar” exists in both “foo” and “toto”.
The other two changes can also still bump into problems because the output can also end up looking like “Entering directory foEntering directory toto; o;”; and I don’t know what can be done to avoid this problem.