GNU bug report logs - #46274
28.0.50; Inconsistent doc for syntax-propertize-function

Previous Next

Package: emacs;

Reported by: Filipp Gunbin <fgunbin <at> fastmail.fm>

Date: Wed, 3 Feb 2021 20:05:02 UTC

Severity: minor

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46274 in the body.
You can then email your comments to 46274 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#46274; Package emacs. (Wed, 03 Feb 2021 20:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Filipp Gunbin <fgunbin <at> fastmail.fm>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 03 Feb 2021 20:05:02 GMT) Full text and rfc822 format available.

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

From: Filipp Gunbin <fgunbin <at> fastmail.fm>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Inconsistent doc for syntax-propertize-function
Date: Wed, 03 Feb 2021 23:04:26 +0300
C-h v syntax-propertize-function contains this text:

--8<---------------cut here---------------start------------->8---
The specified function may call `syntax-ppss' on any position
before END, but if it calls `syntax-ppss' on some
position and later modifies the buffer on some earlier position,
then it is its responsibility to call `syntax-ppss-flush-cache' to flush
the now obsolete ppss info from the cache.
--8<---------------cut here---------------end--------------->8---

But (info "(elisp) Syntax Properties") has a different view:

--8<---------------cut here---------------start------------->8---
It is allowed to call ‘syntax-ppss’ on any position before END.
However, it should not call ‘syntax-ppss-flush-cache’; so, it is not
allowed to call ‘syntax-ppss’ on some position and later modify the
buffer at an earlier position.
--8<---------------cut here---------------end--------------->8---

Which is the right one?

Thanks.

In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.2.0, NS appkit-2022.20 Version 11.1 (Build 20C69))
 of 2021-02-03 built on fgunbin.local
Repository revision: 20e48b6fd6cade60e468140a66127d326abfb8ff
Repository branch: master
System Description:  macOS 11.1




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46274; Package emacs. (Thu, 04 Feb 2021 08:35:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 46274 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#46274: 28.0.50; Inconsistent doc for
 syntax-propertize-function
Date: Thu, 04 Feb 2021 09:34:11 +0100
Filipp Gunbin <fgunbin <at> fastmail.fm> writes:

> C-h v syntax-propertize-function contains this text:
>
> The specified function may call `syntax-ppss' on any position
> before END, but if it calls `syntax-ppss' on some
> position and later modifies the buffer on some earlier position,
> then it is its responsibility to call `syntax-ppss-flush-cache' to flush
> the now obsolete ppss info from the cache.
>
> But (info "(elisp) Syntax Properties") has a different view:
>
> It is allowed to call ‘syntax-ppss’ on any position before END.
> However, it should not call ‘syntax-ppss-flush-cache’; so, it is not
> allowed to call ‘syntax-ppss’ on some position and later modify the
> buffer at an earlier position.
>
> Which is the right one?

Good question.  Stefan M added to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46274; Package emacs. (Thu, 04 Feb 2021 16:24:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 46274 <at> debbugs.gnu.org
Subject: Re: bug#46274: 28.0.50; Inconsistent doc for
 syntax-propertize-function
Date: Thu, 04 Feb 2021 11:23:16 -0500
>> C-h v syntax-propertize-function contains this text:
>>
>> The specified function may call `syntax-ppss' on any position
>> before END, but if it calls `syntax-ppss' on some
>> position and later modifies the buffer on some earlier position,
>> then it is its responsibility to call `syntax-ppss-flush-cache' to flush
>> the now obsolete ppss info from the cache.
>>
>> But (info "(elisp) Syntax Properties") has a different view:
>>
>> It is allowed to call ‘syntax-ppss’ on any position before END.
>> However, it should not call ‘syntax-ppss-flush-cache’; so, it is not
>> allowed to call ‘syntax-ppss’ on some position and later modify the
>> buffer at an earlier position.
>>
>> Which is the right one?
>
> Good question.  Stefan M added to the CCs.

Great question.  Thanks for asking.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46274; Package emacs. (Thu, 04 Feb 2021 20:35:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 46274 <at> debbugs.gnu.org
Subject: Re: bug#46274: 28.0.50; Inconsistent doc for
 syntax-propertize-function
Date: Thu, 04 Feb 2021 15:34:33 -0500
>> C-h v syntax-propertize-function contains this text:
>>
>> The specified function may call `syntax-ppss' on any position
>> before END, but if it calls `syntax-ppss' on some
>> position and later modifies the buffer on some earlier position,
>> then it is its responsibility to call `syntax-ppss-flush-cache' to flush
>> the now obsolete ppss info from the cache.
>>
>> But (info "(elisp) Syntax Properties") has a different view:
>>
>> It is allowed to call ‘syntax-ppss’ on any position before END.
>> However, it should not call ‘syntax-ppss-flush-cache’; so, it is not
>> allowed to call ‘syntax-ppss’ on some position and later modify the
>> buffer at an earlier position.
>>
>> Which is the right one?
>
> Good question.  Stefan M added to the CCs.

I think the docstring is the one that's more right (especially since
there is a fair number of syntax-propertize-functions which do call
‘syntax-ppss-flush-cache’).


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46274; Package emacs. (Fri, 05 Feb 2021 08:39:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 46274 <at> debbugs.gnu.org
Subject: Re: bug#46274: 28.0.50; Inconsistent doc for
 syntax-propertize-function
Date: Fri, 05 Feb 2021 09:38:10 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Good question.  Stefan M added to the CCs.
>
> Great question.  Thanks for asking.

You're welcome, I'm sure.

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I think the docstring is the one that's more right (especially since
> there is a fair number of syntax-propertize-functions which do call
> ‘syntax-ppss-flush-cache’).

OK, I've now updated the manual in Emacs 28 (by just copying the bit
from the doc string and tweaking it slightly).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 05 Feb 2021 08:39:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 46274 <at> debbugs.gnu.org and Filipp Gunbin <fgunbin <at> fastmail.fm> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 05 Feb 2021 08:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#46274; Package emacs. (Fri, 05 Feb 2021 15:00:02 GMT) Full text and rfc822 format available.

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

From: Filipp Gunbin <fgunbin <at> fastmail.fm>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 46274 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#46274: 28.0.50; Inconsistent doc for
 syntax-propertize-function
Date: Fri, 05 Feb 2021 17:59:32 +0300
Thank you both!

Filipp




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 06 Mar 2021 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 109 days ago.

Previous Next


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