From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#25362: 26.0.50; comment-region goes into an infinite loop Date: Sat, 7 Jan 2017 10:27:10 +0000 Message-ID: <20170107102709.GB3499@acm.fritz.box> References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.fsf@gnu.org> <20170107082023.GA3499@acm.fritz.box> <83shovb3wd.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1483784898 32186 195.159.176.226 (7 Jan 2017 10:28:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2017 10:28:18 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: dima@secretsauce.net, 25362@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 07 11:28:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPoEJ-00070z-7T for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2017 11:28:07 +0100 Original-Received: from localhost ([::1]:56721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPoEN-00032N-Ch for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2017 05:28:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPoEI-000326-6I for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 05:28:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPoEE-0006FN-8h for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 05:28:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPoEE-0006FH-4Y; Sat, 07 Jan 2017 05:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cPoED-0005tS-SN; Sat, 07 Jan 2017 05:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sat, 07 Jan 2017 10:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25362 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: confirmed Original-Received: via spool by 25362-submit@debbugs.gnu.org id=B25362.148378484922609 (code B ref 25362); Sat, 07 Jan 2017 10:28:01 +0000 Original-Received: (at 25362) by debbugs.gnu.org; 7 Jan 2017 10:27:29 +0000 Original-Received: from localhost ([127.0.0.1]:45611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPoDg-0005sb-N0 for submit@debbugs.gnu.org; Sat, 07 Jan 2017 05:27:28 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:52240 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPoDe-0005sS-LH for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 05:27:27 -0500 Original-Received: (qmail 82800 invoked by uid 3782); 7 Jan 2017 10:27:25 -0000 Original-Received: from acm.muc.de (p548C75D0.dip0.t-ipconnect.de [84.140.117.208]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 07 Jan 2017 11:27:24 +0100 Original-Received: (qmail 4517 invoked by uid 1000); 7 Jan 2017 10:27:10 -0000 Content-Disposition: inline In-Reply-To: <83shovb3wd.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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: 208.118.235.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:127874 Archived-At: Hello, Eli. On Sat, Jan 07, 2017 at 11:44:34AM +0200, Eli Zaretskii wrote: > > Date: Sat, 7 Jan 2017 08:20:23 +0000 > > Cc: dima@secretsauce.net, 25362@debbugs.gnu.org > > From: Alan Mackenzie > > There are actually two distinct bugs at work, here. One of them is > > simple, the fix being merely giving a limit to an invocation of > > c-forward-syntactic-ws. > Does doing that prevent the infloop? It prevents one infloop, but not the other one, which happens after the first one is fixed. > > The other bug is more involved. It involves the invalidation of the > > whitespace cache, which is currently done incorrectly when "//" is > > inserted into a line which already has comment markers later on that > > line. It should be simple to fix, but is actually quite tricky, with a > > likelihood of unwanted side effects if it's not done very carefully. I > > might be able to fix it today, but I'm not certain of that. > > I've done a bisection on the repository, and the commit that > > "introduced" the bug didn't really introduce it at all - it merely > > uncovered it. That commit was 4b9ac23960d2998f899287ffcf696ad33b63a69a > > from 2016-07-03, "Speed up CC Mode fontification with less accurate > > functions extending region". > If no better solution emerges, would it make sense to revert 4b9ac23 > on the release branch, as a temporary workaround that prevents the > infloop? Apologies, that commit is only in master, not the emacs-25 branch. I'll need to do some more careful bisection. I'll get back to you later. > Thanks. -- Alan Mackenzie (Nuremberg, Germany).