From unknown Thu Aug 14 22:17:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41809: c-context-line-break incorrect after comments: cache issue? Resent-From: "Daniel Colascione" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jun 2020 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41809 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 41809@debbugs.gnu.org Cc: acm@muc.de X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15918917692312 (code B ref -1); Thu, 11 Jun 2020 16:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Jun 2020 16:09:29 +0000 Received: from localhost ([127.0.0.1]:37860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjPlg-0000bE-RD for submit@debbugs.gnu.org; Thu, 11 Jun 2020 12:09:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:59114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjPlf-0000b7-PK for submit@debbugs.gnu.org; Thu, 11 Jun 2020 12:09:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPlf-0005tQ-IJ for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:09:27 -0400 Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:45088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPlc-0002Ce-In for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:09:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From: Subject:Date:Message-ID:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JLdK9iQGmU9PPJCE8jxLkdKd5SnzEgcr18WVO9P7XpI=; b=GqkYXKHvhsD8Th7ZZuH7+hBYJD R78m9ptnrBxeiQlCmvnnCRxoNF5wCtJ/NyKNeZsUZm4Vh1k8+J1UIsVwd0orEydLJwW0Ei9Tnve5m wT+vNV1SaLCaXDnLi3qMUtMXVigXXoCon5fKFX2DdJn8zz+D7KwDmVHYazMs+VIaQ//UI9Uc4p7bs v0ux9kUHQ051zoMAQoahS2XQoRi9RWbCFuPtXua4U+1QTwPC1E4Jj4iJ5d1PrRYnJD9ljC7f2hPty FxgZcmWh5E9E4my0Oo2v2Ea4YaTEXUi65l/eFSS895xNd+uXYMRcQMwRuzMKerolm8vFkTCtfMSrU yJtoaQwg==; Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.89) (envelope-from ) id 1jjPlV-00030S-Fi; Thu, 11 Jun 2020 09:09:17 -0700 Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Thu, 11 Jun 2020 09:09:17 -0700 Message-ID: <0bc193e74adca0ff2fea88aae374330b.squirrel@dancol.org> Date: Thu, 11 Jun 2020 09:09:17 -0700 From: "Daniel Colascione" User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Received-SPF: pass client-ip=2600:3c01::f03c:91ff:fedf:adf3; envelope-from=dancol@dancol.org; helo=dancol.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: c-context-line-break sometimes incorrectly extends a comment when invoked immediately after the end of a comment. To repro: emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-context-line-break))' Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2600:3c01:0:0:f03c:91ff:fedf:adf3 listed in] [zen.spamhaus.org] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: dancol.org] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=dancol%40dancol.org; ip=209.51.188.17; r=debbugs.gnu.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 XPRIO Has X-Priority header X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: c-context-line-break sometimes incorrectly extends a comment when invoked immediately after the end of a comment. To repro: emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-context-line-break))' Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: dancol.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2600:3c01:0:0:f03c:91ff:fedf:adf3 listed in] [zen.spamhaus.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=dancol%40dancol.org;ip=209.51.188.17;r=debbugs.gnu.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager c-context-line-break sometimes incorrectly extends a comment when invoked immediately after the end of a comment. To repro: emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-context-line-break))' The second c-context-line-break occurs when point is *after* the comment, so the /*foo*/ comment shouldn't be extended --- yet it is. The problem appears to be some kind of cc-mode cache corruption. This recipe behaves correctly: $ emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-before-change (point-min) (point-max)) (c-after-change (point-min) (point-max) (1- (point-max))) (c-context-line-break))' From unknown Thu Aug 14 22:17:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41809: c-context-line-break incorrect after comments: cache issue? References: <0bc193e74adca0ff2fea88aae374330b.squirrel@dancol.org> Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jun 2020 18:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41809 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Daniel Colascione" Cc: 41809@debbugs.gnu.org, acm@muc.de Received: via spool by 41809-submit@debbugs.gnu.org id=B41809.159190071917123 (code B ref 41809); Thu, 11 Jun 2020 18:39:02 +0000 Received: (at 41809) by debbugs.gnu.org; 11 Jun 2020 18:38:39 +0000 Received: from localhost ([127.0.0.1]:38017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjS62-0004S7-Tn for submit@debbugs.gnu.org; Thu, 11 Jun 2020 14:38:39 -0400 Received: from colin.muc.de ([193.149.48.1]:52810 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jjS60-0004Rp-Jb for 41809@debbugs.gnu.org; Thu, 11 Jun 2020 14:38:37 -0400 Received: (qmail 59332 invoked by uid 3782); 11 Jun 2020 18:38:29 -0000 Date: 11 Jun 2020 18:38:29 -0000 Message-ID: <20200611183829.59331.qmail@mail.muc.de> From: Alan Mackenzie Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/11.3-RELEASE-p9 (amd64)) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Daniel. In article you wrote: > c-context-line-break sometimes incorrectly extends a comment when invoked > immediately after the end of a comment. To repro: > emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) > (c-context-line-break) (delete-char -2) (end-of-line) > (c-context-line-break))' > The second c-context-line-break occurs when point is *after* the comment, > so the /*foo*/ comment shouldn't be extended --- yet it is. The problem > appears to be some kind of cc-mode cache corruption. This recipe behaves > correctly: > $ emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) > (c-context-line-break) (delete-char -2) (end-of-line) (c-before-change > (point-min) (point-max)) (c-after-change (point-min) (point-max) (1- > (point-max))) (c-context-line-break))' Thanks for the report. After a quick bit of edebugging, it seems to be an off-by-one error in some cache handling. It shouldn't be too difficult to sort out. -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Aug 14 22:17:29 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41809: c-context-line-break incorrect after comments: cache issue? Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jun 2020 07:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41809 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Daniel Colascione Cc: 41809@debbugs.gnu.org Received: via spool by 41809-submit@debbugs.gnu.org id=B41809.159194773111700 (code B ref 41809); Fri, 12 Jun 2020 07:43:01 +0000 Received: (at 41809) by debbugs.gnu.org; 12 Jun 2020 07:42:11 +0000 Received: from localhost ([127.0.0.1]:38857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjeKI-00032e-RS for submit@debbugs.gnu.org; Fri, 12 Jun 2020 03:42:11 -0400 Received: from colin.muc.de ([193.149.48.1]:30693 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jjeKH-00032R-04 for 41809@debbugs.gnu.org; Fri, 12 Jun 2020 03:42:09 -0400 Received: (qmail 94356 invoked by uid 3782); 12 Jun 2020 07:42:02 -0000 Received: from acm.muc.de (p4fe15d7d.dip0.t-ipconnect.de [79.225.93.125]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Fri, 12 Jun 2020 09:42:01 +0200 Received: (qmail 10373 invoked by uid 1000); 12 Jun 2020 07:42:01 -0000 Date: Fri, 12 Jun 2020 07:42:01 +0000 Message-ID: <20200612074201.GA5615@ACM> References: <20200611183829.59331.qmail@mail.muc.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200611183829.59331.qmail@mail.muc.de> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again, Daniel. On Thu, Jun 11, 2020 at 18:38:29 -0000, Alan Mackenzie wrote: > In article you wrote: > > c-context-line-break sometimes incorrectly extends a comment when invoked > > immediately after the end of a comment. To repro: > > emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) > > (c-context-line-break) (delete-char -2) (end-of-line) > > (c-context-line-break))' > > The second c-context-line-break occurs when point is *after* the comment, > > so the /*foo*/ comment shouldn't be extended --- yet it is. The problem > > appears to be some kind of cc-mode cache corruption. This recipe behaves > > correctly: > > $ emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) > > (c-context-line-break) (delete-char -2) (end-of-line) (c-before-change > > (point-min) (point-max)) (c-after-change (point-min) (point-max) (1- > > (point-max))) (c-context-line-break))' > Thanks for the report. > After a quick bit of edebugging, it seems to be an off-by-one error in > some cache handling. It shouldn't be too difficult to sort out. Would you please try out the following patch on your real code where you found the bug. It seems to fix your test case. diff -r fd31432873bd cc-engine.el --- a/cc-engine.el Thu Jun 11 10:50:35 2020 +0000 +++ b/cc-engine.el Fri Jun 12 07:32:38 2020 +0000 @@ -3141,7 +3141,7 @@ (not base) ; FIXME!!! Compare base and far-base?? ; (2019-05-21) (not end) - (> here end)) + (>= here end)) (progn (setq far-base-and-state (c-parse-ps-state-below here) far-base (car far-base-and-state) @@ -3154,7 +3154,7 @@ (or (and (> here base) (null end)) (null (nth 8 s)) - (and end (> here end)) + (and end (>= here end)) (not (or (and (nth 3 s) ; string Thanks! -- Alan Mackenzie (Nuremberg, Germany). From unknown Thu Aug 14 22:17:29 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Daniel Colascione" Subject: bug#41809: closed (Re: bug#41809: c-context-line-break incorrect after comments: cache issue?) Message-ID: References: <20200625171229.GB10342@ACM> <0bc193e74adca0ff2fea88aae374330b.squirrel@dancol.org> X-Gnu-PR-Message: they-closed 41809 X-Gnu-PR-Package: emacs Reply-To: 41809@debbugs.gnu.org Date: Thu, 25 Jun 2020 17:13:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1593105182-17243-1" This is a multi-part message in MIME format... ------------=_1593105182-17243-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #41809: c-context-line-break incorrect after comments: cache issue? which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 41809@debbugs.gnu.org. --=20 41809: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41809 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1593105182-17243-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 41809-done) by debbugs.gnu.org; 25 Jun 2020 17:12:38 +0000 Received: from localhost ([127.0.0.1]:41030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1joVQU-0004TX-IH for submit@debbugs.gnu.org; Thu, 25 Jun 2020 13:12:38 -0400 Received: from colin.muc.de ([193.149.48.1]:33825 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1joVQS-0004TD-Lp for 41809-done@debbugs.gnu.org; Thu, 25 Jun 2020 13:12:37 -0400 Received: (qmail 83845 invoked by uid 3782); 25 Jun 2020 17:12:29 -0000 Received: from acm.muc.de (p4fe15761.dip0.t-ipconnect.de [79.225.87.97]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Thu, 25 Jun 2020 19:12:29 +0200 Received: (qmail 11124 invoked by uid 1000); 25 Jun 2020 17:12:29 -0000 Date: Thu, 25 Jun 2020 17:12:29 +0000 To: Daniel Colascione Subject: Re: bug#41809: c-context-line-break incorrect after comments: cache issue? Message-ID: <20200625171229.GB10342@ACM> References: <20200611183829.59331.qmail@mail.muc.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200611183829.59331.qmail@mail.muc.de> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41809-done Cc: acm@muc.de, 41809-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Daniel. On Thu, Jun 11, 2020 at 18:38:29 -0000, Alan Mackenzie wrote: > In article you wrote: > > c-context-line-break sometimes incorrectly extends a comment when invoked > > immediately after the end of a comment. To repro: > > emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) > > (c-context-line-break) (delete-char -2) (end-of-line) > > (c-context-line-break))' > > The second c-context-line-break occurs when point is *after* the comment, > > so the /*foo*/ comment shouldn't be extended --- yet it is. The problem > > appears to be some kind of cc-mode cache corruption. This recipe behaves > > correctly: > > $ emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) > > (c-context-line-break) (delete-char -2) (end-of-line) (c-before-change > > (point-min) (point-max)) (c-after-change (point-min) (point-max) (1- > > (point-max))) (c-context-line-break))' > Thanks for the report. > After a quick bit of edebugging, it seems to be an off-by-one error in > some cache handling. It shouldn't be too difficult to sort out. It wasn't. I've committed a simple patch for this, and I'm closing the bug. > -- > Alan Mackenzie (Nuremberg, Germany). ------------=_1593105182-17243-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 11 Jun 2020 16:09:29 +0000 Received: from localhost ([127.0.0.1]:37860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjPlg-0000bE-RD for submit@debbugs.gnu.org; Thu, 11 Jun 2020 12:09:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:59114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjPlf-0000b7-PK for submit@debbugs.gnu.org; Thu, 11 Jun 2020 12:09:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPlf-0005tQ-IJ for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:09:27 -0400 Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:45088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPlc-0002Ce-In for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:09:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From: Subject:Date:Message-ID:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JLdK9iQGmU9PPJCE8jxLkdKd5SnzEgcr18WVO9P7XpI=; b=GqkYXKHvhsD8Th7ZZuH7+hBYJD R78m9ptnrBxeiQlCmvnnCRxoNF5wCtJ/NyKNeZsUZm4Vh1k8+J1UIsVwd0orEydLJwW0Ei9Tnve5m wT+vNV1SaLCaXDnLi3qMUtMXVigXXoCon5fKFX2DdJn8zz+D7KwDmVHYazMs+VIaQ//UI9Uc4p7bs v0ux9kUHQ051zoMAQoahS2XQoRi9RWbCFuPtXua4U+1QTwPC1E4Jj4iJ5d1PrRYnJD9ljC7f2hPty FxgZcmWh5E9E4my0Oo2v2Ea4YaTEXUi65l/eFSS895xNd+uXYMRcQMwRuzMKerolm8vFkTCtfMSrU yJtoaQwg==; Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.89) (envelope-from ) id 1jjPlV-00030S-Fi; Thu, 11 Jun 2020 09:09:17 -0700 Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Thu, 11 Jun 2020 09:09:17 -0700 Message-ID: <0bc193e74adca0ff2fea88aae374330b.squirrel@dancol.org> Date: Thu, 11 Jun 2020 09:09:17 -0700 Subject: c-context-line-break incorrect after comments: cache issue? From: "Daniel Colascione" To: bug-gnu-emacs@gnu.org User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Received-SPF: pass client-ip=2600:3c01::f03c:91ff:fedf:adf3; envelope-from=dancol@dancol.org; helo=dancol.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: c-context-line-break sometimes incorrectly extends a comment when invoked immediately after the end of a comment. To repro: emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-context-line-break))' Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2600:3c01:0:0:f03c:91ff:fedf:adf3 listed in] [zen.spamhaus.org] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: dancol.org] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=dancol%40dancol.org; ip=209.51.188.17; r=debbugs.gnu.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 XPRIO Has X-Priority header X-Debbugs-Envelope-To: submit Cc: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: c-context-line-break sometimes incorrectly extends a comment when invoked immediately after the end of a comment. To repro: emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-context-line-break))' Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: dancol.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [2600:3c01:0:0:f03c:91ff:fedf:adf3 listed in] [zen.spamhaus.org] 0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=dancol%40dancol.org;ip=209.51.188.17;r=debbugs.gnu.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager c-context-line-break sometimes incorrectly extends a comment when invoked immediately after the end of a comment. To repro: emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-context-line-break))' The second c-context-line-break occurs when point is *after* the comment, so the /*foo*/ comment shouldn't be extended --- yet it is. The problem appears to be some kind of cc-mode cache corruption. This recipe behaves correctly: $ emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-before-change (point-min) (point-max)) (c-after-change (point-min) (point-max) (1- (point-max))) (c-context-line-break))' ------------=_1593105182-17243-1--