From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#20975: Replacing text add also the comma Date: Sun, 05 Jul 2015 00:07:34 +0300 Organization: LINKOV.NET Message-ID: <87si93d42x.fsf@mail.linkov.net> References: <55970987.1060809@alice.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1436044346 20021 80.91.229.3 (4 Jul 2015 21:12:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jul 2015 21:12:26 +0000 (UTC) Cc: 20975@debbugs.gnu.org, Artur Malabarba To: Angelo Graziosi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 04 23:12:12 2015 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 1ZBUjL-0006Dm-Od for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 23:12:12 +0200 Original-Received: from localhost ([::1]:45205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBUjK-0000Q6-Hn for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jul 2015 17:12:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBUjG-0000Oh-Am for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 17:12:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBUjC-0008V1-TD for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 17:12:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBUjC-0008Ut-Q4 for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 17:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZBUjC-0008Jx-Kj for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 17:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2015 21:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20975 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20975-submit@debbugs.gnu.org id=B20975.143604430231934 (code B ref 20975); Sat, 04 Jul 2015 21:12:02 +0000 Original-Received: (at 20975) by debbugs.gnu.org; 4 Jul 2015 21:11:42 +0000 Original-Received: from localhost ([127.0.0.1]:39984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBUir-0008Iz-ME for submit@debbugs.gnu.org; Sat, 04 Jul 2015 17:11:42 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:38907 helo=homiemail-a17.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBUip-0008Io-JO for 20975@debbugs.gnu.org; Sat, 04 Jul 2015 17:11:40 -0400 Original-Received: from homiemail-a17.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a17.g.dreamhost.com (Postfix) with ESMTP id 88E5C2B206A; Sat, 4 Jul 2015 14:11:38 -0700 (PDT) Original-Received: from localhost.linkov.net (unknown [212.119.148.140]) (Authenticated sender: jurta@jurta.org) by homiemail-a17.g.dreamhost.com (Postfix) with ESMTPA id 5BE902B2065; Sat, 4 Jul 2015 14:11:37 -0700 (PDT) In-Reply-To: <55970987.1060809@alice.it> (Angelo Graziosi's message of "Sat, 04 Jul 2015 00:15:35 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) 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:104717 Archived-At: > Suppose one has a file with this text > > $ cat foo.log > abcd r8 efg > foo(a_r8,b_r8,c_r8) > > Try to replace 'r8' with 'DP', i.e. in the minibuffer, > > M-% > Query replace: > r8 > Query replace r8 with: DP > > The 'r8' on the first row is replaced correctly while on the second row > also the comma is added to the text 'r8' to be replaced. > > foo.log becomes > > $ cat foo.log > abcd DP efg > foo(a_DPb_DPc_DP) > > Is this intentional or a bug? Thanks for the report, this is an unintentional bug. '8' matches the adjacent comma because (character-fold-to-regexp "8") contains "8[,.]" The culprit is #x1f109 =E2=80=9CDIGIT EIGHT COMMA=E2=80=9D with decomposi= tion: (compat '8' ',') and #x248f =E2=80=9CDIGIT EIGHT FULL STOP=E2=80=9D with decompos= ition: (compat '8' '.') We don't need to match the decomposition =E2=80=9C8,=E2=80=9D when search= ing for =E2=80=9C8=E2=80=9D. We only need to match the char #x1f109 when searching for =E2=80=9C8=E2=80= =9D. Maybe Artur has an idea how to fix this regexp?