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.
This fixes #97 as it related to grep.
find’s “-name” option never matches a path, so binding
grep-find-ignored-files
would never allow us to ignore such. Therefore, .projectile
paths like the following would not ignore anything when grepping (except for directories unusually bearing extensions):It was only possible to ignore all files in a project with a given name, and only by specifying that name with a leading slash:
Specifying a file or directory name without a leading slash would not ignore anything:
Also, if an ignore was a path to a directory that existed from the root, then all such paths to directories in a project would be ignored. However, if the path was to a direct descendant of the root which was not a directory (or did not even exist), then all non-directory files in the project with that direct descendant’s name would be ignored, and if the path was to a 2nd-generation or later non-directory or non-existent descendant, then nothing would be ignored.
These strange cases stemmed from probable misuse of
grep-find-ignored-directories
, which seems to only be intended for ignoring directory names appearing anywhere, and misuse ofgrep-find-ignored-files
, which seems to only be intended for ignoring file names appearing anywhere and without respect to parent directories. Therefore, binding ignores viagrep-find-ignored-directories
andgrep-find-ignored-files
greatly limited what could be ignored.To ignore paths to files and to get more consistent behavior, I thought it was warranted to write a special exclusion expression supporting paths and which only ignored files and directories relative to the root. Also, to fulfill the promise of the documentation and provide support for relative paths (or patterns as I interpreted it), it was warranted to write another special exclusion expression supporting patterns occurring anywhere.
make test
)M-x checkdoc
warnings I documentedprojectile-rgrep-default-command
to the same extent as its source function,rgrep-default-command
. Let me know if you’d prefer more documentation.You've updated the readme (if adding/changing user-visible functionality)Thanks for considering these changes.