Subject: bug#64198: Feature request: compile.el's "Find this in" prompt should be hookable.

From: Dave Abrahams <[email-masked]>
Date: Wed, 21 Jun 2023 09:09:08 -0700

> On Jun 21, 2023, at 4:24 AM, Eli Zaretskii <[email-masked]> wrote:
> 
>> From: Dave Abrahams <[email-masked]>
>> 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?

When Swift asserts, it doesn't write the path to the file into the output, because… reasons I grudgingly accept.  So one needs to guess at the file.  https://github.com/apple/swift/issues/66777 contains all the details, but if you want additional info, please ask.