From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22983: syntax-ppss returns wrong result. Date: Fri, 11 Mar 2016 15:15:12 +0000 Message-ID: <20160311151512.GD2888@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1457710368 4925 80.91.229.3 (11 Mar 2016 15:32:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2016 15:32:48 +0000 (UTC) To: 22983@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 11 16:32:35 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aeP3L-0007rd-8E for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Mar 2016 16:32:35 +0100 Original-Received: from localhost ([::1]:55779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeP3J-0000w7-UA for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Mar 2016 10:32:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeOkU-0008HM-Hv for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 10:13:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeOkQ-0001BQ-MZ for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 10:13:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeOkQ-0001BB-Jk for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 10:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aeOkQ-0005yX-G4 for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 10:13: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: Fri, 11 Mar 2016 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.145770917522953 (code B ref -1); Fri, 11 Mar 2016 15:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Mar 2016 15:12:55 +0000 Original-Received: from localhost ([127.0.0.1]:45261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aeOkJ-0005y9-AO for submit@debbugs.gnu.org; Fri, 11 Mar 2016 10:12:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33628) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aeOkI-0005xx-1t for submit@debbugs.gnu.org; Fri, 11 Mar 2016 10:12:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeOk9-000179-2N for submit@debbugs.gnu.org; Fri, 11 Mar 2016 10:12:48 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:55196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeOk8-000175-VZ for submit@debbugs.gnu.org; Fri, 11 Mar 2016 10:12:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeOk3-0007Tn-CB for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 10:12:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeOk0-00015w-5m for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 10:12:39 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:58568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeOjz-00015g-Lx for bug-gnu-emacs@gnu.org; Fri, 11 Mar 2016 10:12:36 -0500 Original-Received: (qmail 9489 invoked by uid 3782); 11 Mar 2016 15:12:33 -0000 Original-Received: from acm.muc.de (p579E8E6B.dip0.t-ipconnect.de [87.158.142.107]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 11 Mar 2016 16:12:32 +0100 Original-Received: (qmail 4653 invoked by uid 1000); 11 Mar 2016 15:15:12 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114753 Archived-At: Hello, Emacs. The fundamental contract in syntax-ppss is that (syntax-ppss POS) returns the same value as (parse-partial-sexp (point-min) POS) (with the exception of elements 2 and 6). This is currently not always the case. In the master branch, emacs -Q and visit xdisp.c with C-x C-f. Follow this recipe: M-: (syntax-ppss-flush-cache 1) M-: (setq ppss-0 (syntax-ppss 40000)) M-< C-s #include " M-> C-x n n M-: (setq ppss-1 (syntax-ppss 40000)) M-: (setq parse (parse-partial-sexp (point-min) 40000)) At this point, `ppss-1' and `parse' should match (apart from elements 2 and 6). What we actually have is: ppss-1: (2 39992 nil nil nil nil 2 nil nil (39975 39992)) parse: (0 nil 15674 34 nil nil 0 nil 15675 nil) . -- Alan Mackenzie (Nuremberg, Germany).