GNU bug report logs -
#63828
29.0.90; project-query-replace-regexp tries to find-and-replace in binary files
Previous Next
Full log
Message #11 received at 63828 <at> debbugs.gnu.org (full text, mbox):
On 01/06/2023 23:16, Spencer Baugh wrote:
> 1. emacs -Q
> 2. Open a git repository which has some binary files committed, or any
> other project that has binary files.
> 3. C-x p r foo bar
> 4. query-replace will enter the binary files
>
> Perhaps it should not do this? Perhaps fileloop-initialize-replace
> should skip binary files? Perhaps by some customization?
It would be useful if you compare to what project-find-regexp does in
such project: does it produce the matches in said binary files?
If it behaves better (from your POV), one solution could be to
pre-filter the list of project files using the same search, before
passing them to project-query-replace-regexp. It can have benefits in
performance as well.
(BTW JFYI, you can press 'r' inside the project-find-regexp output
buffer instead of using 'project-query-replace-regexp'.)
This bug report was last modified 2 years and 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.