Subject: bug#73018: 31.0.50; wdired + replace-regexp only modifies the visible portion of the buffer

From: Michael Heerdegen <[email-masked]>
Date: Fri, 06 Sep 2024 14:04:58 +0200

Juri Linkov <[email-masked]> writes:

> Maybe this is reproducible only on very long Dired buffers?

I tried in a buffer with over 19,000 files.  I should have experienced a
problem (no matches found, nothing changed) if font-lock would be
related.  But every function involved always found matches hundreds of
screens below the current position.  I reloaded the buffer after each
experiment to be sure only the currently visited area was ever displayed.

OTOH, I did see the match-data issue occur.  Maybe this is the only
reason of our problems.  I would focus on trying to understand that
problem.

> > Second: I'm confused.  Apparently, when `dired-isearch-filenames-mode'
> > is on, why do `search-forward-regexp' and `replace-regexp' behave
> > differently?  `search-forward-regexp' does find matches outside of file
> > names that `replace-regexp' ignores.
>
> `replace-regexp' uses Isearch functions,
> `search-forward-regexp' is a core function that doesn't use Isearch.

It's a not-so-nice inconsistency, but ok...

Michael.