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 #8 received at 63828 <at> debbugs.gnu.org (full text, mbox):
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Date: Thu, 01 Jun 2023 16:16:03 -0400
>
>
> 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?
Either user option or prefix argument, IMO. And this should be
documented with the caveat that a VCS can decide that a file is binary
even when it is not. For example, I've seen Git treating very large
parser.c files in tree-sitter grammar repositories as binary files for
some reason. Another example is CVS on MS-Windows: best practice is
to checkout all the files with the -kb switch, so that the client
doesn't attempt to convert EOLs to the Windows CR-LF format (which
ruins some files).
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.