From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Josh Feinstein Newsgroups: gmane.emacs.bugs Subject: bug#14708: 24.2; query-replace-regexp when match and replacement are the same Date: Mon, 24 Jun 2013 21:17:53 -0700 Message-ID: References: <7E039918541B4C4183BFDB8F015C74300E8E80@WCL-EXCH02.wcl.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bea3fceff861104dff2d1d8 X-Trace: ger.gmane.org 1372138632 6186 80.91.229.3 (25 Jun 2013 05:37:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 05:37:12 +0000 (UTC) Cc: Ed Avis , 14708@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 25 07:37:11 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrLwF-0004r3-7m for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 07:37:11 +0200 Original-Received: from localhost ([::1]:57012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrLwE-0006Yw-SG for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 01:37:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrLw9-0006YZ-Iz for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 01:37:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrLw6-00061I-G8 for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 01:37:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrLw6-000615-DA for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 01:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UrLw5-0002Wz-Sp for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 01:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Josh Feinstein Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2013 05:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14708 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14708-submit@debbugs.gnu.org id=B14708.13721385749661 (code B ref 14708); Tue, 25 Jun 2013 05:37:01 +0000 Original-Received: (at 14708) by debbugs.gnu.org; 25 Jun 2013 05:36:14 +0000 Original-Received: from localhost ([127.0.0.1]:39422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrLvJ-0002Vk-Vj for submit@debbugs.gnu.org; Tue, 25 Jun 2013 01:36:14 -0400 Original-Received: from mail-qe0-f50.google.com ([209.85.128.50]:64303) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrKi6-0000Vz-HS for 14708@debbugs.gnu.org; Tue, 25 Jun 2013 00:18:31 -0400 Original-Received: by mail-qe0-f50.google.com with SMTP id f6so463569qej.23 for <14708@debbugs.gnu.org>; Mon, 24 Jun 2013 21:18:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=GpQB+yHq1lTSJA4rsweEnXiqisSGlPzw8XuMwfzhz28=; b=VYx+ZMsW5JU1jqHSQQ5OUwalN3ENtiRxhVfFRU/TRhjkcLxNvCAhUABzvihMRLdHr9 Btm0oHCYT5LLnJ5czf95Taje8iOeU97eWZvxyoJzMgKI8RDVrzfYtdfx2n+GSIe8J+EB RhRFbWev2MkFIa661ZcxM0pyaPVDeyw5B1mouD5ZMMKHM2urA8Af300mrNviwY48KpSZ nSqlOKLedXO/5PykwgEHNSaxg1iqwYrO7UmlWa4+amZ1PF1D1Lf9DFPkr5Ue4MX6tFmD 1/aBljEfbsc3nEJpBlT75dYqj03KjXuaAU3rXfYF6C8/b0+DE2eO6IteyTc/hVZYhHex TPgw== X-Received: by 10.49.41.41 with SMTP id c9mr25219441qel.19.1372133905086; Mon, 24 Jun 2013 21:18:25 -0700 (PDT) Original-Received: by 10.49.5.227 with HTTP; Mon, 24 Jun 2013 21:17:53 -0700 (PDT) In-Reply-To: X-Gm-Message-State: ALoCoQkuB1yaVsG4z+AsuIPlBeoBN4yeUvc7503T/sO1lEujfOorS3PlVW5ZU9g++2PJau8EFgFw X-Mailman-Approved-At: Tue, 25 Jun 2013 01:36:12 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75546 Archived-At: --047d7bea3fceff861104dff2d1d8 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jun 24, 2013 at 6:49 PM, Stefan Monnier 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 " +". --047d7bea3fceff861104dff2d1d8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Jun 24, 2013 at 6:49 PM, Stefan Monnier <= monnier@iro.umontreal.ca> wrote:
> Si= nce 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 regexp= s?=A0 Changing the behavior to either silently ignore such cases or issue a= vague "skipped some replacements" message would make it more dif= ficult to detect such breakage and the affected buffer locations, with the = only benefit stated so far being to save someone typing "=A0 +" i= nstead of " +".
--047d7bea3fceff861104dff2d1d8--