GNU bug report logs - #22983
syntax-ppss returns wrong result.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 11 Mar 2016 15:13:02 UTC

Severity: normal

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #123 received at 22983 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Alan Mackenzie <acm <at> muc.de>
Cc: John Wiegley <jwiegley <at> gmail.com>, Philipp Stephani <p.stephani2 <at> gmail.com>,
 22983 <at> debbugs.gnu.org
Subject: Re: bug#22983: syntax-ppss returns wrong result.
Date: Sat, 9 Sep 2017 15:18:11 +0300
On 9/9/17 1:20 PM, Alan Mackenzie wrote:

> In the implementation, I have left the function `syntax-ppss' untouched
> except for adding a function call to set up the cache right at the
> start.  I have refactored syntax-ppss-flush-cache, extracting a function
> which is called directly from the cache-selecting code.  Other than
> that, there is one new function (which switches the current cache in
> use) and a few new variables to keep track of the caches.

Not sure I understand. If you call (syntax-ppss) with significantly 
different narrowings without flushing the cache (e.g. without modifying 
the buffer), sounds like it'll have to return the same results under the 
described implementation.

If so, it doesn't sound strict enough.

>> Caveats:
> 
>> - This solves the dependency on point-min, but does nothing about the
>> dependency on the current syntax-table (which can change). I'm not
>> necessarily suggesting we try to solve that now, though.
> 
> I had some ideas on this back in the spring (about having "indirect
> variables") which could be used quickly to "swap out" the current
> syntax-table text properties, and (more importantly) quickly swap them
> back in.  But that's for another day.

I admit I'm not sure what all this implies.

>> - Before this change is pushed to master, or shortly after, I'd like to
>> know that it actually fixed the problem Philipp experienced with
>> python-mode, so we can revert 4fbd330. If it was caused by e.g.
>> syntax-table changing, we've not improved much.
> 
> I am naturally interested in this, too.  If my patch doesn't fix this
> bug, at least it will have removed a layer of fog inhibiting its
> investigation.

Let's hope so.




This bug report was last modified 7 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.