Subject: Re: bug#65347: 29.1; Underscore in query replace prevents case-matching

From: Eli Zaretskii <[email-masked]>
Date: Sat, 19 Aug 2023 08:50:04 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Fri, 18 Aug 2023 15:20:21 -0400
> 
> In my experience, there are enough slightly different circumstances that
> it's going to be hard to cover all cases automatically.

Perhaps, but this could only be established by auditing each case one
by one.

> Personally (as a user) the functionality I'd prefer is the following:
> When the matched string does not have the same capitalization as the search
> pattern, I'd like Emacs to guess what should be the capitalization of
> the replacement and ask me to confirm its guess.

This already happens?  M-% shows you the replacement in the exact
capitalization it will insert, _after_ the guesswork.  And you are
already requested to confirm each replacement.  So what is missing?