From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#23019: parse-partial-sexp doesn't output the full state needed for its continuance. Date: Thu, 17 Mar 2016 08:58:27 -0400 Message-ID: References: <20160315091355.GA2263@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1458219569 25059 80.91.229.3 (17 Mar 2016 12:59:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2016 12:59:29 +0000 (UTC) Cc: 23019@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 17 13:59:18 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 1agXWH-0003iA-Ax for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Mar 2016 13:59:17 +0100 Original-Received: from localhost ([::1]:34655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agXWB-0002Yv-9b for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Mar 2016 08:59:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agXW7-0002X1-Ae for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2016 08:59:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agXW2-0006g5-Bs for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2016 08:59:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agXW2-0006g0-8D for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2016 08:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1agXW1-00040Q-WA for bug-gnu-emacs@gnu.org; Thu, 17 Mar 2016 08:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Mar 2016 12:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23019 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23019-submit@debbugs.gnu.org id=B23019.145821951615365 (code B ref 23019); Thu, 17 Mar 2016 12:59:01 +0000 Original-Received: (at 23019) by debbugs.gnu.org; 17 Mar 2016 12:58:36 +0000 Original-Received: from localhost ([127.0.0.1]:50735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agXVc-0003zl-5U for submit@debbugs.gnu.org; Thu, 17 Mar 2016 08:58:36 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:25472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agXVZ-0003zX-C1 for 23019@debbugs.gnu.org; Thu, 17 Mar 2016 08:58:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A3FgA731xV/6jw92hcgxCEAoVVwwsEAgKBPDwRAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSQuiAkIzyMBAQEHAgEfizqFBQeELQWQNKRQI4FmVYFZIoJ4AQEB X-IPAS-Result: A0A3FgA731xV/6jw92hcgxCEAoVVwwsEAgKBPDwRAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSQuiAkIzyMBAQEHAgEfizqFBQeELQWQNKRQI4FmVYFZIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="196475014" Original-Received: from 104-247-240-168.cpe.teksavvy.com (HELO pastel.home) ([104.247.240.168]) by ironport2-out.teksavvy.com with ESMTP; 17 Mar 2016 08:58:27 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 59CAD6405A; Thu, 17 Mar 2016 08:58:27 -0400 (EDT) In-Reply-To: <20160315091355.GA2263@acm.fritz.box> (Alan Mackenzie's message of "Tue, 15 Mar 2016 09:13:55 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:114993 Archived-At: > Proposed solution: Add an extra element to the parser state, recording the > syntax of the last character passed over before the end of the parse. > This would be used by parse-partial-sexp to initialise its parse. Another option is to record "the start of current element" (in case we were in the middle of an element). This could potentially reuse (nth 5 ppss) by generalizing it, or it could use a new entry. The choice probably doesn't matter much and will probably be more a question of "what's easier to implement". > Also: the existing element 9 (the list of currently open parens) and the > new element should be explicitly documented in the Elisp manual, together > with a statement that there may be further elements in the parse state > used internally by parse-partial-sexp (for future expansion). Indeed. Andreas R=F6hler added: > a comment start might be composed not just by two characters, but by three > or more. What then? Andreas, I suggest that you go back and take a closer look at parse-partial-sexp, syntax-ppss, and syntax-tables in general because lately you've made several comments like the one here which show you're just not familiar with the topic at all. Syntax tables do not support comment markers longer than 2 characters (currently). Emacs supports those via the `syntax-table' text-property only (which typically marks the first char of each "long comment starter" as being "the comment starter"). Stefan