As reported on emacs-devel, a bug is present in `compilation-get-file-structure’ when the “file” matched by the `compilation-parse-errors’ is not a file, but a buffer name. Both filenames and buffer names are explicitly allowed in errors. From the `compilation-error-regexp-alist’ docstring (emphasis added):
Or FILE can also be a function that returns (FILENAME) or (RELATIVE-FILENAME . DIRNAME). In the former case, FILENAME may be relative or absolute, or it may be a buffer.
Note that this is useful for modes which report errors in text from open buffers, which may have no associated file. The issue is this line in `compilation-get-file-structure’:
(if (file-name-absolute-p filename)
(setq filename (concat comint-file-name-prefix filename)))
which signals an