From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: 63828@debbugs.gnu.org
Subject: bug#63828: 29.0.90; project-query-replace-regexp tries to find-and-replace in binary files
Date: Fri, 02 Jun 2023 09:08:16 +0300 [thread overview]
Message-ID: <83y1l2bdm7.fsf@gnu.org> (raw)
In-Reply-To: <iery1l3ym4c.fsf@janestreet.com> (message from Spencer Baugh on Thu, 01 Jun 2023 16:16:03 -0400)
> From: Spencer Baugh <sbaugh@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).
next prev parent reply other threads:[~2023-06-02 6:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 20:16 bug#63828: 29.0.90; project-query-replace-regexp tries to find-and-replace in binary files Spencer Baugh
2023-06-02 6:08 ` Eli Zaretskii [this message]
2023-06-03 1:47 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y1l2bdm7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=63828@debbugs.gnu.org \
--cc=sbaugh@janestreet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).