From: Dmitry Gutov <dmitry@gutov.dev>
To: Spencer Baugh <sbaugh@janestreet.com>, 63828@debbugs.gnu.org
Subject: bug#63828: 29.0.90; project-query-replace-regexp tries to find-and-replace in binary files
Date: Sat, 3 Jun 2023 04:47:02 +0300 [thread overview]
Message-ID: <0d8df374-dcb7-0dd7-f14c-11713ede2bc8@gutov.dev> (raw)
In-Reply-To: <iery1l3ym4c.fsf@janestreet.com>
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'.)
prev parent reply other threads:[~2023-06-03 1:47 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
2023-06-03 1:47 ` Dmitry Gutov [this message]
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=0d8df374-dcb7-0dd7-f14c-11713ede2bc8@gutov.dev \
--to=dmitry@gutov.dev \
--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).