emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug #22983 (syntax-ppss returns wrong result) is still open. Could w


From: Dmitry Gutov
Subject: Re: Bug #22983 (syntax-ppss returns wrong result) is still open. Could we fix it before the release, please.
Date: Sat, 11 Jun 2016 19:10:03 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2

On 06/11/2016 01:07 PM, Alan Mackenzie wrote:

Why before the release in particular?

Haven't I just said?  :-)  If not before the release, then when?

Right after? Slightly after that? Whenever. "Before the release" doesn't look like a meaningful constraint, considering the commit will go on master.

I'm still not even clear which branch 25.2 will come from, and that's an important concern.

Is Vitalie still working on ... anything else to do with
Emacs)?

Yes:

https://github.com/emacs-ess/ESS/commits/master
https://github.com/vspinu/polymode/commits/master

Adding hard-widen, however, is a low-level endeavor, and it seems nobody sufficiently proficient there is in any hurry to help.

I can't say I feel enthusiastic about "hard-widen".  I haven't looked
into it that thoroughly, but it feels a bit like an ugly hack whose
ramifications might percolate all the way through Emacs, and that might
make us regret it fairly heavily in the not too distant future.

Hadn't you yourself proposed a far more invasive solution, not too long ago? I think hard-widen strikes a certain balance, in that is will require a moderate amount of changes in Emacs, and little to no changes in the user code, considering we've always (or at least for a long time) had to write it with consideration for the current narrowing.

If there's anything to complain about it, it's that it doesn't bring new niceties. So: modest gains, and little amount of pain. Seems conservative enough for the Emacs community.

Yes, I think having the binary toggle `syntax-ppss-dont-widen' purely to
direct the innards of the function is poor programming (since it
explicitly toggles a toggle inside a supposedly abstract function).

Abstract?

Yes, abstract.  `syntax-ppss' has an specification and interface on the
one side, and an implementation on the other.

Just like any other function?

I think an improvement would be to dispense with that toggle, and
have two distinct functions, one in place of
`syntax-ppss-dont-widen' being nil, and the other in place of
`s-p-d-w' being non-nil.  The latter function might usefully have an
extra parameter specifying the base point that parse-partial-sexp
should be calculated from.  That would leave quite a few options
open for the internal logic of the function.

That wouldn't help in the multi-mode case, which is the primary use I
have in mind for syntax-ppss-dont-widen.

Why would it not help?

Because you (in CC Mode) will choose the more straightforward version that does widen. And I, in mmm-mode, will thus have no ability to modify what your code is doing by narrowing, and will send you dark thoughts instead.

What's the purpose of the other function? Who's going to use it?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]