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#23019: parse-partial-sexp doesn't output the full state needed for its continuance. Date: Tue, 5 Apr 2016 14:44:53 +0000 Message-ID: <20160405144453.GC3463@acm.fritz.box> References: <20160318151154.GA9433@acm.fritz.box> <20160318182547.GB9433@acm.fritz.box> <20160319170624.GC2644@acm.fritz.box> <20160405125409.GB3463@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 1459867346 24900 80.91.229.3 (5 Apr 2016 14:42:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Apr 2016 14:42:26 +0000 (UTC) Cc: John Wiegley , 23019@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 05 16:42:15 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 1anSBK-0003ZB-Rt for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Apr 2016 16:42:14 +0200 Original-Received: from localhost ([::1]:37476 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anSBK-0008JV-BC for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Apr 2016 10:42:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anSBC-0008J5-32 for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2016 10:42:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anSB8-0007sl-Pq for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2016 10:42:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anSB8-0007sQ-Lg for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2016 10:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1anSB8-0003tg-Gf for bug-gnu-emacs@gnu.org; Tue, 05 Apr 2016 10:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Apr 2016 14:42:02 +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.145986731714970 (code B ref 23019); Tue, 05 Apr 2016 14:42:02 +0000 Original-Received: (at 23019) by debbugs.gnu.org; 5 Apr 2016 14:41:57 +0000 Original-Received: from localhost ([127.0.0.1]:52428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anSB3-0003tO-Bg for submit@debbugs.gnu.org; Tue, 05 Apr 2016 10:41:57 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:63008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anSB1-0003tF-HB for 23019@debbugs.gnu.org; Tue, 05 Apr 2016 10:41:56 -0400 Original-Received: (qmail 86609 invoked by uid 3782); 5 Apr 2016 14:41:53 -0000 Original-Received: from acm.muc.de (p548A5A8B.dip0.t-ipconnect.de [84.138.90.139]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 05 Apr 2016 16:41:52 +0200 Original-Received: (qmail 4863 invoked by uid 1000); 5 Apr 2016 14:44:53 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:116055 Archived-At: Hello, Stefan. On Tue, Apr 05, 2016 at 09:50:41AM -0400, Stefan Monnier wrote: > > One concern I have is that there is code out there which compensates for > > the previous inadequate behaviour (I know there is in CC Mode), and it > > may be more difficult to switch off this compensation if there isn't an > > easy way to distinguish new from old, such as (> (length state) 10). > I'd be very surprised if other packages went to that trouble, but if > needed you can still distinguish the new from the old with something like: > (defconst pps-is-new > (let ((st (make-syntax-table))) > (modify-syntax-entry ?/ ". 14" st) > (with-temp-buffer > (with-syntax-table st > (insert "/") > (nth 5 (parse-partial-sexp (point-min) (point-max))))))) It can certainly be done, yes, but that way it can only really be done at set up time, wherease (> (length state) 10) could be done more or less at any time. It was just a small point, really. > -- Stefan -- Alan Mackenzie (Nuremberg, Germany).