Subject: Re: bug#78520: 31.0.50; Performance issue in dired+isearch with dired-isearch-filenames

From: Michael Heerdegen <[email-masked]>
Date: Thu, 12 Jun 2025 16:37:31 +0200

Juri Linkov <[email-masked]> writes:

> `wdired-search-replace-filenames` is required anyway
> since it also sets `replace-search-function`.

Hmm - but we could also try to do this when query-replace is invoked.
Similar to what we do when invoking isearch.

Do we handle wdired differently only because of this problem?

|  ;; Original dired hook removes dired-isearch-search-filenames that
|  ;; is needed outside isearch for lazy-highlighting in query-replace.
|  (remove-hook 'isearch-mode-hook #'dired-isearch-filenames-setup t)

Maybe we could solve this in some other way?  Then, isearch and
query-replace would just look whether filename only matching is enabled
or not, and do the according setup when any of them is called by the
user.

Michael.