From: Dave Abrahams <dave@boostpro.com>
Date: Tue, 20 Jun 2023 15:30:58 -0700
[I hope this is the right venue for feature requests. If not, sorry!]
This is the right place.
When a file can't be found via the path given in a diagnostic, I'd like to be able to override the prompt that emacs gives to locate the file. compilation-parse-errors-filename-function happens too early, while the buffer is being initially parsed. A similar compilation-locate-file-function would be great. If there's interest I could try to develop a patch.
Before discussing patches, could you please describe your situation?
Specifically, how does it happen that neither the compilation
directory plus the file name shown by the diagnostics nor the search
of compilation-search-path succeed to locate the file? And what would
the hook function you suggest adding do to resolve this, i.e. how
would it know where to look for the file?