GNU bug report logs - #14708
24.2; query-replace-regexp when match and replacement are the same

Previous Next

Package: emacs;

Reported by: Ed Avis <eda <at> waniasset.com>

Date: Mon, 24 Jun 2013 15:52:05 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 14708 <at> debbugs.gnu.org (full text, mbox):

From: Josh Feinstein <jlf <at> foxtail.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Ed Avis <eda <at> waniasset.com>, 14708 <at> debbugs.gnu.org
Subject: Re: bug#14708: 24.2; query-replace-regexp when match and replacement
 are the same
Date: Mon, 24 Jun 2013 21:17:53 -0700
[Message part 1 (text/plain, inline)]
On Mon, Jun 24, 2013 at 6:49 PM, Stefan Monnier <monnier <at> iro.umontreal.ca>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 " +".
[Message part 2 (text/html, inline)]

This bug report was last modified 11 years and 118 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.