From: Juri Linkov <juri@linkov.net>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: sbaugh@catern.com, 53758@debbugs.gnu.org
Subject: bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch
Date: Sun, 06 Feb 2022 19:44:34 +0200 [thread overview]
Message-ID: <867da8x7v1.fsf@mail.linkov.net> (raw)
In-Reply-To: <87mtj7yddd.fsf@earth.mail-host-address-is-not-set> (sbaugh@catern.com's message of "Thu, 03 Feb 2022 19:11:11 +0000 (UTC)")
> isearch-forward (C-s) while in a recursive edit (C-r) triggered from
> dired-do-find-regexp-and-replace (Q in a dired buffer) always fails to
> find any matches for any string, even if there are matches in the
> buffer.
>
> Steps to reproduce:
> 1. Open a dired buffer in a directory containing at least one file which
> contains some text (e.g. "Hello world")
> 2. Run dired-do-find-regexp-and-replace to replace "Hello" with
> "Goodbye" ("Q Hello RET Goodbye RET"); this will switch buffers
> to the first matching file.
> 3. Type C-r to enter a recursive edit (I'm guessing this runs
> (recursive-edit)?)
> 4. At the start of the buffer, run isearch-forward searching for "world"
> ("C-s world RET")
> 5. Note that the isearch fails despite "world" being in the buffer.
>
> For what it's worth, this interestingly doesn't happen with
> project-query-regexp-replace (which also does multi-file query-replace).
This is because of these lines in xref--query-replace-1:
;; Counteract the "do the next match now" hack in
;; `perform-replace'. And still, it'll report that those
;; matches were "filtered out" at the end.
(isearch-filter-predicate
(lambda (beg end)
(and current-beg
(>= beg current-beg)
(<= end current-end))))
Dmitry, could you please explain the comment above.
What I don't understand is where this
"the next match now" hack is in `perform-replace'?
next prev parent reply other threads:[~2022-02-06 17:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 19:11 bug#53758: 28.0.91; Recursive edit during dired-do-find-regexp-and-replace breaks isearch sbaugh
2022-02-06 17:44 ` Juri Linkov [this message]
2022-02-07 3:03 ` Dmitry Gutov
2022-02-07 19:27 ` Juri Linkov
2022-02-07 21:12 ` Dmitry Gutov
2022-02-08 7:43 ` Juri Linkov
2022-02-08 16:12 ` Dmitry Gutov
2022-02-08 19:35 ` Juri Linkov
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=867da8x7v1.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=53758@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=sbaugh@catern.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).