Subject: bug#78038: 26.3; query-replace

From: Stephen Berman <[email-masked]>
Date: Thu, 24 Apr 2025 18:08:26 +0200

On Thu, 24 Apr 2025 09:31:54 +0000 (UTC) Niclas Olsson via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email-masked]> wrote:
[...]
> The query-replace (default FROM -> TO) is a major disaster.
> I do not want FROM -> TO suggestions and no matter what I try
> and spend on googling this crap I cant turn it off.
> Have you ever imagined to try out a very long FROM string
> and then want to do another search/replace after???
[...]
> I have tried all setq on the:
>
> query-replace-defaults
>         query-replace-from-history-variable
> query-replace-from-to-separator
>         query-replace-help
> query-replace-highlight
>         query-replace-history
> query-replace-interactive
>         query-replace-lazy-highlight
> query-replace-map
>         query-replace-show-replacement
> query-replace-skip-read-only
>         query-replace-to-history-variable
>
> but I simply cant get rid of the very annoying, totally unnecessary:
> (default FROM -> TO). [...]

Making query-replace-read-from-default return the empty string seems to
work; try adding this to your ~/.emacs file:

(setq query-replace-read-from-default (lambda () (make-string 0 32)))

Steve Berman