From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34525: replace-regexp missing some matches Date: Mon, 18 Feb 2019 17:50:16 +0200 Message-ID: <83zhqtjdtz.fsf@gnu.org> References: <5a74a337-804e-2590-bffd-43a851f90240@gmail.com> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="184642"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34525@debbugs.gnu.org To: Daniel Lopez , Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 18 16:51:48 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvlCs-000lv1-RC for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Feb 2019 16:51:46 +0100 Original-Received: from localhost ([127.0.0.1]:60980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvlCr-0007du-RP for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Feb 2019 10:51:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvlCA-0007Gy-Tb for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2019 10:51:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvlCA-0006Dq-5Q for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2019 10:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53815) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvlC9-0006Db-Tr for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2019 10:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gvlC9-0005q2-Rz for bug-gnu-emacs@gnu.org; Mon, 18 Feb 2019 10:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Feb 2019 15:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34525 X-GNU-PR-Package: emacs Original-Received: via spool by 34525-submit@debbugs.gnu.org id=B34525.155050501822392 (code B ref 34525); Mon, 18 Feb 2019 15:51:01 +0000 Original-Received: (at 34525) by debbugs.gnu.org; 18 Feb 2019 15:50:18 +0000 Original-Received: from localhost ([127.0.0.1]:53096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvlBR-0005p5-Mb for submit@debbugs.gnu.org; Mon, 18 Feb 2019 10:50:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvlBQ-0005or-Pm for 34525@debbugs.gnu.org; Mon, 18 Feb 2019 10:50:17 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvlBK-0005MJ-R9; Mon, 18 Feb 2019 10:50:10 -0500 Original-Received: from [176.228.60.248] (port=1262 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gvlBK-0005jh-01; Mon, 18 Feb 2019 10:50:10 -0500 In-reply-to: <5a74a337-804e-2590-bffd-43a851f90240@gmail.com> (message from Daniel Lopez on Mon, 18 Feb 2019 08:28:35 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:155494 Archived-At: > From: Daniel Lopez > Date: Mon, 18 Feb 2019 08:28:35 +0000 > > - Start "emacs -Q" and open the file BitmapFontFace.h > - Evaluate the expression (replace-regexp "\\" "SharedBitmap") > - The text "Replaced 8 occurrences" appears in the echo area. > > Problem: > > There were actually 12 occurrences (ie. of the word "Bitmap" surrounded > by word boundaries) in the file that should have been replaced. If I now > move point back to the start of the buffer and evaluate the expression > again, it says "Replaced 4 occurrences". > > The exact number of incorrect replacements perhaps varies over time. > That is, I can test it five times in a row and get 8 initial replacments > each time, but after trying some other search terms, messing with the > file, restarting Emacs etc, I try my initial test again and then maybe > it consistently replaces 10 the first time, for a while. So your exact > numbers may vary. C++ Mode plays some funky games with the syntax of '<', so maybe this is the consequence. CC'ing Alan, in the hope that he might have something interesting to say about this. Thanks.