`projectile-replace` does not respect `.projectile` file
Expected behavior
I have - *~ in my .projectile file. projectile-find-file correctly ignores my emacs backup files ending with ~. I expect that projectile-replace follows the same behavior, and ignores backup files.
Actual behavior
Projectile hops into my backup files, I don't notice, and then when I hit y it tells me that the file is readonly (true) and kills my replace session (frustrating).
Steps to reproduce the problem
Copy a file in your project and append a ~. Add - *~ to your .projectile file. Notice that projectile-find-file (With prefix argument, to clear cache) ignores these files. However, projectile-replace will still enter them.
Environment & Version information
Projectile version information
Projectile version: 20180227.1743
Emacs version
GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-02-12
Operating system
Arch Linux
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
bump
I've noticed this as well and came here to open an issue about this, but see I don't have to. I use projectile-grep and projectile-replace all the time. The former respects the .projectile file, the latter does not. Why is that?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
That's a shame, and I'm sorry to hear that Mr. Bot.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
In our age robots perform all actions, but we humans are hired to do nothing.
Is this getting looked into? I have the same issue
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!
The former respects the .projectile file, the latter does not. Why is that?
Because projectile-replace doesn't use any file filtering for performance reasons - it just finds all files that contain the replacement string in the project directory. That's fairly easy to change, but will make the replacement slow on very big projects. See projectile-files-from-cmd and you'll understand what I'm talking about.
That's illuminating, thank you. But I'm having trouble thinking of the fundamental limitation. Are grep/rg/etc. slower when you ask them to filter files?
Hey, just bumping this, the behaviour seems strange as it tries to replace instances in large binary files that I don't want it to look into, this either takes ages or crashes emacs.