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#24870: 26.0.50; parse-partial-sexp ignores comment-end Date: Thu, 15 Dec 2016 16:50:11 +0000 Message-ID: <20161215165011.GB2437@acm.fritz.box> References: <7cb86247-1e30-f029-0b9b-c53cc096ec4b@easy-emacs.de> <87mvggh2hu.fsf@users.sourceforge.net> <87h967cj0f.fsf@users.sourceforge.net> <87eg1bcg0y.fsf@users.sourceforge.net> <20161214195623.GA3881@acm.fritz.box> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1481820856 7296 195.159.176.226 (15 Dec 2016 16:54:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2016 16:54:16 +0000 (UTC) User-Agent: Mutt/1.5.24 (2015-08-30) Cc: 24870@debbugs.gnu.org, Matt Armstrong , npostavs@users.sourceforge.net To: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 15 17:54:12 2016 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 1cHZIH-0000bD-9l for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Dec 2016 17:54:09 +0100 Original-Received: from localhost ([::1]:55760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHZIL-0001Zk-LF for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Dec 2016 11:54:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHZFK-0004mm-7E for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:51:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHZFH-0001Ie-6F for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:51:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55983) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHZFH-0001IZ-2N for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:51:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cHZFG-00015C-9z for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2016 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24870 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 24870-submit@debbugs.gnu.org id=B24870.14818206354127 (code B ref 24870); Thu, 15 Dec 2016 16:51:02 +0000 Original-Received: (at 24870) by debbugs.gnu.org; 15 Dec 2016 16:50:35 +0000 Original-Received: from localhost ([127.0.0.1]:43149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHZEp-00014V-0D for submit@debbugs.gnu.org; Thu, 15 Dec 2016 11:50:35 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:62566 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cHZEn-00014N-D7 for 24870@debbugs.gnu.org; Thu, 15 Dec 2016 11:50:34 -0500 Original-Received: (qmail 60676 invoked by uid 3782); 15 Dec 2016 16:50:32 -0000 Original-Received: from acm.muc.de (p548C78B0.dip0.t-ipconnect.de [84.140.120.176]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 15 Dec 2016 17:50:31 +0100 Original-Received: (qmail 3107 invoked by uid 1000); 15 Dec 2016 16:50:11 -0000 Content-Disposition: inline In-Reply-To: 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:127064 Archived-At: Hello, Andreas. On Thu, Dec 15, 2016 at 09:18:01AM +0100, Andreas Röhler wrote: > On 14.12.2016 20:56, Alan Mackenzie wrote: > > We're talking about 9dcf5998935c8aaa846d7585b81f0dcfe1935b3d from Sun > > Mar 20 13:19:48 2016 +0000, still? > > The idea is that in a (parse-partial-sexp from to), the end position > > might be in the middle of a two character comment marker, such as "/*". > > Before this change, it was impossible successfully to use the result of > > that operation as the old state for continuing parse-partial-sexp from > > that position, since it did not contain enough info to see it was in a > > comment after passing the "*" > > The change 9dcf599 added an extra element onto the parse state which was > > non-nil when we end up after a "/", etc. > Hi Alan, > sounds like a classical mistake for me. Quite possibly. > You commented lately on the effect of narrowing and how simply to > respect its results. Nothing further to say here. I don't see what your meaning is here, but never mind. > OTOH: do you have a use-case, a bug, which propelled the amendment? Yes. It was quite a few years ago, but a bug in CC Mode was caused by parse-partial-sexp terminating at a critical place, and the next invocation of parse-partial-sexp thus going wrong. I programmed round it awkwardly at the time. Also syntax-ppss would be falling into the trap quite a lot, I think. I don't think it checked specially for the critical case. Now it doesn't have to bother - at least, it won't as soon as Noam has corrected the current bug. ;-) > Thanks, > Andreas -- Alan Mackenzie (Nuremberg, Germany).