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: Thu, 28 Feb 2019 19:41:12 +0200 Message-ID: <83k1hjkdzb.fsf@gnu.org> References: <20190224173746.GA21808@ACM> <83mumlnk8y.fsf@gnu.org> <20190224210058.GB21808@ACM> <83mumjmxv6.fsf@gnu.org> <20190226135048.GA19653@ACM> <20190227142251.GB4772@ACM> <838sy1kwxo.fsf@gnu.org> <20190227173132.GG4772@ACM> <83zhqhjea1.fsf@gnu.org> <20190228105025.GB4686@ACM> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="182512"; mail-complaints-to="usenet@blaine.gmane.org" Cc: daniel.lopez999@gmail.com, monnier@IRO.UMontreal.CA, 34525@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 28 18:42:34 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 1gzPhZ-000lMw-Pv for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Feb 2019 18:42:33 +0100 Original-Received: from localhost ([127.0.0.1]:43802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzPhY-0002qo-Op for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Feb 2019 12:42:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzPhQ-0002pP-Cm for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2019 12:42:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzPhM-0007yI-Fy for bug-gnu-emacs@gnu.org; Thu, 28 Feb 2019 12:42:22 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzPh4-0007qt-Qz; Thu, 28 Feb 2019 12:42:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gzPh4-0001gK-DI; Thu, 28 Feb 2019 12:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Thu, 28 Feb 2019 17:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34525 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 34525-submit@debbugs.gnu.org id=B34525.15513757136447 (code B ref 34525); Thu, 28 Feb 2019 17:42:02 +0000 Original-Received: (at 34525) by debbugs.gnu.org; 28 Feb 2019 17:41:53 +0000 Original-Received: from localhost ([127.0.0.1]:55448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzPgv-0001fu-4d for submit@debbugs.gnu.org; Thu, 28 Feb 2019 12:41:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzPgs-0001fi-LE for 34525@debbugs.gnu.org; Thu, 28 Feb 2019 12:41:51 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzPgl-0007gH-KN; Thu, 28 Feb 2019 12:41:43 -0500 Original-Received: from [176.228.60.248] (port=3697 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gzPgk-0007Xu-IF; Thu, 28 Feb 2019 12:41:43 -0500 In-reply-to: <20190228105025.GB4686@ACM> (message from Alan Mackenzie on Thu, 28 Feb 2019 10:50:25 +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:155901 Archived-At: > Date: Thu, 28 Feb 2019 10:50:25 +0000 > Cc: daniel.lopez999@gmail.com, 34525@debbugs.gnu.org > From: Alan Mackenzie > > (i) Calculate ->position's in previous_interval and next_interval, as my > tentative patch already does. > (ii) Calculate the ->position's in update_interval, on moving to > parents. > (iii) Do away with update_interval, replacing it in syntax.c with > previous/next_interval in while loops. > > At the moment, only (i) has been tried. > > Speed-wise, it seems not to make any difference in an optimised GNU > build, though it did appear to be significantly (~4%) slower on an > unoptimised build which scrolls through a C++ file with lots of > templates. I don't think it's worth the effort to make a systematic > speed comparison between the alternatives. > > (iv) Additionally, there is a cleanup wanted, where setting ->position > in the chain of parents should be moved from update_syntax_table to > find_interval. > > In (i), the convention for ->position would be that it is valid for the > target interval together with all its parents. In (ii) and (iii), it > would only be valid in the final target intervals found by navigation. > I think this should be explicitly stated in a comment in struct > interval. > > So, where do we go from here? If it were up to me, I would probably > chose (i), simply because it's already been done, but I've no strong > feelings over it. I prefer not to do (i) because it has much wider implications than needed. Either (ii) or (iii) are okay with me. The former seems to be simpler, so I tend to favor it slightly.