From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ed Avis Newsgroups: gmane.emacs.bugs Subject: bug#14708: 24.2; query-replace-regexp when match and replacement are the same Date: Tue, 25 Jun 2013 06:56:07 +0000 Message-ID: <7E039918541B4C4183BFDB8F015C74300E9E08@WCL-EXCH02.wcl.local> References: <7E039918541B4C4183BFDB8F015C74300E8E80@WCL-EXCH02.wcl.local> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1372143431 18979 80.91.229.3 (25 Jun 2013 06:57:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 06:57:11 +0000 (UTC) Cc: "'14708@debbugs.gnu.org'" <14708@debbugs.gnu.org> To: "'jlf@foxtail.org'" , "'monnier@iro.umontreal.ca'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 25 08:57:12 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 1UrNBf-0004f9-JK for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 08:57:11 +0200 Original-Received: from localhost ([::1]:49367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrNBf-0006Iz-Aq for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 02:57:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrNBZ-0006ET-Ik for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 02:57:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrNBW-0007vs-GH for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 02:57:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrNBW-0007vo-Cl for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 02:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UrNBV-0004ac-Jq for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 02:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ed Avis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2013 06:57: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.137214337817566 (code B ref 14708); Tue, 25 Jun 2013 06:57:01 +0000 Original-Received: (at 14708) by debbugs.gnu.org; 25 Jun 2013 06:56:18 +0000 Original-Received: from localhost ([127.0.0.1]:39515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrNAn-0004ZF-5L for submit@debbugs.gnu.org; Tue, 25 Jun 2013 02:56:17 -0400 Original-Received: from mail1.bemta5.messagelabs.com ([195.245.231.152]:56458) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrNAj-0004Z4-0C for 14708@debbugs.gnu.org; Tue, 25 Jun 2013 02:56:13 -0400 Original-Received: from [85.158.139.83:40867] by server-16.bemta-5.messagelabs.com id 2B/75-31941-A0F39C15; Tue, 25 Jun 2013 06:56:10 +0000 X-Env-Sender: eda@waniasset.com X-Msg-Ref: server-4.tower-182.messagelabs.com!1372143368!25783935!1 X-Originating-IP: [80.169.169.167] X-StarScan-Received: X-StarScan-Version: 6.9.9; banners=waniasset.com,-,- X-VirusChecked: Checked Original-Received: (qmail 30273 invoked from network); 25 Jun 2013 06:56:09 -0000 Original-Received: from unknown (HELO WCL-EXCHCAS02.wcl.local) (80.169.169.167) by server-4.tower-182.messagelabs.com with AES128-SHA encrypted SMTP; 25 Jun 2013 06:56:09 -0000 Original-Received: from WCL-EXCH02.wcl.local ([169.254.1.11]) by WCL-EXCHCAS02.wcl.local ([149.85.127.102]) with mapi id 14.02.0318.004; Tue, 25 Jun 2013 07:56:08 +0100 Thread-Topic: bug#14708: 24.2; query-replace-regexp when match and replacement are the same Thread-Index: Ac5w0CjtpWjfQgWfSKGXwT/2YP4U9gAdhnAyAAMUaYAAB585gA== In-Reply-To: Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [149.85.127.28] 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:75550 Archived-At: I wouldn't say that the regexp in this case is broken - only suboptimal. T= he user entered something correct, to replace all sequences of spaces by a= single space. If done as a global replace without confirmation, you would= n't even notice. The user asked for confirmation of each change to end up = with the right text in the buffer, not as an academic exercise in finding = the best possible regexp. So prompting for each no-op match is not really helping the user. I can se= e that sometimes you might use query-replace-regexp as a debugging aid (th= ough surely a simple search without replacement would be better). But even= then it would be enough just to flag up one case where match=3Dreplacemen= t, not request y or n for each one, since they are all identical. (Here I = am assuming no capturing groups.) So maybe the answer is to flag the first no-op match but then skip the res= t.=20 ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________