bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57883: compilation-get-file-structure mishandles buffers


From: JD Smith
Subject: bug#57883: compilation-get-file-structure mishandles buffers
Date: Sat, 17 Sep 2022 10:25:25 -0400


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 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]