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 08:20:23 +0000 Message-ID: <20170107082023.GA3499@acm.fritz.box> References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.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 1483777281 26114 195.159.176.226 (7 Jan 2017 08:21:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 7 Jan 2017 08:21:21 +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 09:21:12 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 1cPmFT-0005JK-4o for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2017 09:21:11 +0100 Original-Received: from localhost ([::1]:56431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPmFV-0004pS-Qk for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Jan 2017 03:21:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPmFO-0004pM-Hf for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 03:21:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPmFK-0005rv-Jv for bug-gnu-emacs@gnu.org; Sat, 07 Jan 2017 03:21:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58386) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPmFK-0005rb-GX; Sat, 07 Jan 2017 03:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cPmFK-0007zZ-BJ; Sat, 07 Jan 2017 03:21:02 -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 08:21:02 +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.148377724230674 (code B ref 25362); Sat, 07 Jan 2017 08:21:02 +0000 Original-Received: (at 25362) by debbugs.gnu.org; 7 Jan 2017 08:20:42 +0000 Original-Received: from localhost ([127.0.0.1]:45552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPmF0-0007yf-9N for submit@debbugs.gnu.org; Sat, 07 Jan 2017 03:20:42 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:37512 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPmEy-0007yX-8G for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 03:20:40 -0500 Original-Received: (qmail 57131 invoked by uid 3782); 7 Jan 2017 08:20:39 -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 09:20:38 +0100 Original-Received: (qmail 3567 invoked by uid 1000); 7 Jan 2017 08:20:23 -0000 Content-Disposition: inline In-Reply-To: <83h95ccywn.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:127866 Archived-At: Hello, Eli. An update. On Fri, Jan 06, 2017 at 11:37:12AM +0200, Eli Zaretskii wrote: > > Date: Fri, 6 Jan 2017 09:32:37 +0000 > > Cc: dima@secretsauce.net, 25362@debbugs.gnu.org > > From: Alan Mackenzie > > > Is this bug new in Emacs 25.1? > > Yes, it is. I've just tried the scenario out on Emacs 24.5, and it > > works OK there. > Then it would be good to have a safe enough solution that we could > install on the release branch, or, failing that, a safe workaround. 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. 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". As a summary, I'm not convinced that the fix I'm working on ought to go into 25.2, even though the bug is quite serious. Maybe that will clarify itself today, sometime. > Thanks. -- Alan Mackenzie (Nuremberg, Germany).