From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs Subject: bug#25362: 26.0.50; comment-region goes into an infinite loop Date: Mon, 09 Jan 2017 13:46:28 -0800 Message-ID: <87pojvlxe3.fsf@secretsauce.net> References: <20170109211801.GA4752@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1483998444 21494 195.159.176.226 (9 Jan 2017 21:47:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jan 2017 21:47:24 +0000 (UTC) User-Agent: mu4e 0.9.17; emacs 26.0.50.1 Cc: 25362@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 09 22:47:20 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 1cQhmc-0004TB-Ej for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2017 22:47:14 +0100 Original-Received: from localhost ([::1]:43290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQhmg-0005fM-NX for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jan 2017 16:47:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQhmV-0005eE-1N for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2017 16:47:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQhmR-0003kP-2k for bug-gnu-emacs@gnu.org; Mon, 09 Jan 2017 16:47:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32780) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cQhmQ-0003kL-V6; Mon, 09 Jan 2017 16:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cQhmQ-0007QO-Nw; Mon, 09 Jan 2017 16:47:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Mon, 09 Jan 2017 21:47: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.148399839228493 (code B ref 25362); Mon, 09 Jan 2017 21:47:02 +0000 Original-Received: (at 25362) by debbugs.gnu.org; 9 Jan 2017 21:46:32 +0000 Original-Received: from localhost ([127.0.0.1]:48178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQhlw-0007PU-2b for submit@debbugs.gnu.org; Mon, 09 Jan 2017 16:46:32 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQhlu-0007PL-2q for 25362@debbugs.gnu.org; Mon, 09 Jan 2017 16:46:30 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8157521CAD; Mon, 9 Jan 2017 16:46:29 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 09 Jan 2017 16:46:29 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=0JrLUvr6qztAG15/CaG6Ngo5UY8=; b=gkP9kl gH0vhZmsUgA15K3je4pn/7KU+wOWRhf72U87o0HsPAwV4V1eDyc6ia9JSmmxPK1D zhQgBKLB/O+BbJPiVe8UF2gEjxr7VoVMx6CRWH1dDnVegBd+R34Iaeh3nK/o6kv4 z1yntp8vqIJtwdL3/F26jb0JdVC19eofDTnjE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=0JrLUvr6qztAG1 5/CaG6Ngo5UY8=; b=H8ru2S2yCgAh1lWVhcdi/R6Bfhz2RsU+UtinCFVf3j9jHc 4QJrgmkvJA7uUB37ZzmfrJ7Hk0UjWFJp3zNHbCmegap9mUTVmA3/QGAI8IQ3QjN+ 2Idlg0OxO7LK0Tld48SeFRBsfU1TB3A0lroewxgDTD7QJMmj0nLoqVnNmaW08= X-ME-Sender: X-Sasl-enc: jeO/uJF4rF3zz94OXMEbknB7xOrYCrSZo3pRaYVHbXzS 1483998389 Original-Received: from shorty.local (unknown [128.149.110.210]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C7312478B; Mon, 9 Jan 2017 16:46:29 -0500 (EST) Original-Received: from dima by shorty.local with local (Exim 4.88) (envelope-from ) id 1cQhls-0003lv-5E; Mon, 09 Jan 2017 13:46:28 -0800 In-reply-to: <20170109211801.GA4752@acm.fritz.box> 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:127942 Archived-At: Alan Mackenzie writes: > Hello again, Dima. > > As already observed, this bug happens simply in C Mode by attempting to > comment out the four lines inside the function, doing this by marking > the lines then C-c C-c. > > The cause was a rather nasty situation where a "syntactic whitespace > cache", designed to facilitate moving rapidly over large areas of WS > (particularly long comments at the beginning of files) got screwed up by > the insertion of "// " onto a line already containing a "//" later on. > > Here is a patch. It is not yet in its final form (the comments need > fixing). Would you please try it out and let me know how well/how badly > it works: Hi. I'm now running with this patch, and some cursory testing says that it works. I briefly ran into an issue where I 1. highlighted a problematic region 2. hit M-; (this worked correctly) 3. Hit M-/ to undo This undo restored the text correctly, but the whole region remained highlighted as a comment, even after the undo removed the comment characters. I hit this once, but cannot reproduce it anymore. If this description means something to you, feel free to act on it :) > Thanks for this rather obscure bug report. :-) Heh. I just report issues that pop up during the course of the day. We owe you hugely for responding to these bugs and maintaining cc-mode. Thanks!