Greetings: The documentation for compilation-error-regexp-alist states > If FILE, LINE or COLUMN are nil or that index didn’t match, that > information is not present on the matched line. In that case the > file name is assumed to be the same as the previous one in the > buffer, line number defaults to 1 and column defaults to > beginning of line’s indentation. which clearly, unambiguously implies that if the FILE index does not match then the previous file name should be used for the error. However that is not what the code does currently, instead it skips such matches. I believe the documented behavior would be strictly more useful than the current implemented behavior, since if unwanted then the file subexpression in the regex should be non-optional anyway. My use case would be to more easily match errors stretching multiple lines, where the file name is only mentioned in a header. I have attached a patch containing my suggested fix. On a side note, the code for handling the case when FILE is a function that returns a (RELATIVE-FILENAME . DIRNAME) cons-cell looks a bit funky. It could probably be cleaned up. Kind regard Axel Forsman