-
-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ignored-*-p: Match against regular expressions #1177
Conversation
Buffers are created by other packages that appear on projectile's buffer lists, but they always have some variation that makes impossible including all possible name cases, thus regular expressions come handy for this sort of cases. This commit allows `*-ignored-*-p` functions to work with regular expressions.
Seems some tests are failing. |
Indeed, but maybe is because I don't know how to properly set them because the changes, when evaluated, works for me. Am I doing the modifications on the tests correctly? |
The function was incorrectly defined, causing to fail on tests. The correct thing to do is to call `projectile-ignored-directories` which returns a sequence.
Nice, all test passed! And I think I revised and modify them correctly. All criticism is welcome and appreciated. |
Any news? :) |
I'd also update the docstrings of the changed function to mention they're doing the checks using regular expressions and also the defcustoms holding ignored names. Apart from this the PR looks good. |
Clarifications added :) Nothing fantastic, I made the annotations about regular expressions short and simple. |
what do you guys think of the PR? 😀 |
@@ -367,7 +367,7 @@ containing a root file." | |||
:type '(repeat string)) | |||
|
|||
(defcustom projectile-globally-unignored-files nil | |||
"A list of files globally unignored by projectile." | |||
"A list of files globally unignored by projectile. Regular expressions can be used." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second sentence should be on the next line. This applies to all the docstring changes.
(should (projectile-ignored-directory-p "/path/to/project/tmp")) | ||
(should-not (projectile-ignored-directory-p "/path/to/project/log")))) | ||
(noflet ((projectile-ignored-directories () '("/path/to/project/tmp" "/path/to/project/t\\.*"))) | ||
(should (projectile-ignored-directory-p "/path/to/project/tmp")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You broke the indentation here. (likely because you didn't require noflet
and Emacs didn't know how to indent it correctly.
Ops, I forgot about it. Looks good overall. I'm a bit concerned that some buffer/file names might also matched the wrong thing when interpreted as a regexp (e.g. |
This also needs to rebased on top of the current |
okay, brb |
Buffers are created by other packages that appear on projectile's buffer lists, but they always have
some variation that makes impossible including all possible name cases, thus regular expressions
come handy for this sort of cases. This commit allows
*-ignored-*-p
functions to work with regularexpressions.
Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):
make test
)M-x checkdoc
warningsThanks!