Subject: Re: bug#14708: 24.2; query-replace-regexp when match and replacement are the same

From: Josh Feinstein <[email-masked]>
Date: Mon, 24 Jun 2013 21:17:53 -0700

On Mon, Jun 24, 2013 at 6:49 PM, Stefan Monnier <[email-masked]>wrote:

> > Since the aim of query-replace-regexp is primarily to do a search
> > and replace, not to find all places in the buffer where a regexp
> > matches, it should instead skip over those cases and only ask about
> > places where replacing will make a difference.
>
> I don't think the difference is very important, but I wouldn't oppose
> such a change.
>

Did you read the point I made above and which the reporter conceded, namely
that such no-op replacements often indicate broken regexps?  Changing the
behavior to either silently ignore such cases or issue a vague "skipped
some replacements" message would make it more difficult to detect such
breakage and the affected buffer locations, with the only benefit stated so
far being to save someone typing "  +" instead of " +".