Correctly compile emacs compile mode error in parallel

When I use M-x compiledir for compilation with make -jn for a project with several (levels) dir, when I get an error message, I cannot get to the right place with next-error. Emacs always ends up in the wrong directory for the problem file. But I have no problem if I just do it without -jn.

+5
source share
1 answer

next-erroruses the text output of your compilation to determine where to go. But with parallel compilation, this text output can be damaged, and even if it is not damaged, it can often be ambiguous (think of one task compiling foo / bar and another task compiling toto / titi, and the result looks like an “incoming” directory foo; enter directory toto; error in bar: 20; error in titi: 69 ").

I can only think of the following ways to solve this problem:

  • structure your make files so you never change the directory (so that all file names refer to the same current working directory).
  • modify your make files to pass absolute file names to your compiler, so all file names in error messages are absolute.
  • Emacs compile.el, "bar" , .

, , (, ), , , "" "foo", "toto". , : " foEntering directory toto; o;"; , , .

0

All Articles