From: Josh Feinstein <jlf@foxtail.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Ed Avis <eda@waniasset.com>, 14708@debbugs.gnu.org
Subject: bug#14708: 24.2; query-replace-regexp when match and replacement are the same
Date: Mon, 24 Jun 2013 21:17:53 -0700 [thread overview]
Message-ID: <CANdFEAH3JAvZsyw8TJkKtmMZTxW2mf+gpESKuvO2nQi9bR8X0A@mail.gmail.com> (raw)
In-Reply-To: <jwv8v1zc651.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
On Mon, Jun 24, 2013 at 6:49 PM, Stefan Monnier <monnier@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 " +".
[-- Attachment #2: Type: text/html, Size: 1333 bytes --]
next prev parent reply other threads:[~2013-06-25 4:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 11:44 bug#14708: 24.2; query-replace-regexp when match and replacement are the same Ed Avis
2013-06-24 16:19 ` Josh
2013-06-24 16:30 ` Ed Avis
2013-06-24 17:01 ` Andreas Schwab
2013-06-25 1:49 ` Stefan Monnier
2013-06-25 4:17 ` Josh Feinstein [this message]
2013-06-25 6:56 ` Ed Avis
2013-06-25 14:10 ` Drew Adams
2013-06-25 15:03 ` Josh
2013-06-25 13:39 ` Stefan Monnier
2013-06-25 14:59 ` Josh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANdFEAH3JAvZsyw8TJkKtmMZTxW2mf+gpESKuvO2nQi9bR8X0A@mail.gmail.com \
--to=jlf@foxtail.org \
--cc=14708@debbugs.gnu.org \
--cc=eda@waniasset.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.