Support `projectile-replace` to select file extension on C-u
Hi,
I created this PR to enable users to select file name pattern and extension when performing projectile-replace with C-u.
This is to prevent projectile-replace from searching on very large files of a project (my Emacs hangs when projectile search on a 1MB Javascript library file, while I only wanted to search and replace on Rust code).
Currently, the file extension filtering is supported only by ag (using the option -G <file-ext-pattern>).
I don't use rg, hence I haven't been able to add the corresponding option for it (and also for ack and grep).
Can you take a look and advise if this PR can be merged?
Thank you!
Before submitting a PR make sure the following things have been done (and denote this by checking the relevant checkboxes):
- [x] The commits are consistent with our contribution guidelines
- [ ] You've added tests (if possible) to cover your change(s)
- [ ] All tests are passing (
eldev test) - [x] The new code is not generating bytecode or
M-x checkdocwarnings - [x] You've updated the changelog (if adding/changing user-visible functionality)
- [ ] You've updated the readme (if adding/changing user-visible functionality)
Thanks!
I like the idea in general, but I think it's a very bad idea to implement something just for one search tool, as it's confusing for the end users if something is available with ag, but not with other tools. Do the other tools rely only on shell globbing for filtering?
@bbatsov: Thanks for the suggestion! I agree on that point.
I added the support for file extension filtering for all searchers now.
I also tested all of them manually in my Linux machine, and they all work well.
The changes look reasonable to me, but you'll also have to mention them somewhere in the online docs, otherwise it's unlikely people will find this behavior.
And the tests seem to be failing now, so this has to be fixed.
The changes look reasonable to me, but you'll also have to mention them somewhere in the online docs, otherwise it's unlikely people will find this behavior.
And the tests seem to be failing now, so this has to be fixed.
Sorry, it was my mistake in the previous commit that I accidentally commented out a line of code, which lead to the failed tests.
Can you run the GitHub action again?
I also updated the CHANGELOG file. Where can I update the online documentation?
I also updated the CHANGELOG file. Where can I update the online documentation?
It's generated from the .adoc files in the docs folder.
Ping :)
@bbatsov: sorry for the long delay! I just updated the documentation.
@taquangtrung It seems the reference to helm-grep-get-file-extensions is breaking the CI. You might have to declare it or something like this.
Thanks! I just updated it.
Thanks!