Fix compilation-find-file advice handling of directory #1691
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
compilation-mode keeps track of the "current" directory in the output by
matching on messages such as make's "Entering directory ...", when this
happens the 'directory' variable is set, but the current code just ignores
it when checking whether we should search across project directories or
not. This means that in cases when the filename is actually unambigous
relative to the given directory we'll still go off and try to find it all
over the project which is less than ideal.
Instead of re-implementing the correct directory logic here we refactor
compilation-find-file-projectile-find-compilation-buffer to locally append
our project directories to the the global compilation-search-path and let
the real compilation-find-file fun do it's thing.
While this makes the behaviour more consistent with the original fun it
does mean that now we always have to get all the project dirs which could
be quite involved in large projects. Previously we could elide this in the
"exits" case.
eldev test
)M-x checkdoc
warnings