GNU bug report logs - #6952
jit-lock with default, small chunk-size causing incorrect fontification in cc-mode

Previous Next

Packages: emacs, cc-mode;

Reported by: Daniel Colascione <dan.colascione <at> gmail.com>

Date: Mon, 30 Aug 2010 23:52:01 UTC

Severity: normal

Tags: unreproducible

Done: Stefan Kangas <stefan <at> marxist.se>

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 6952 in the body.
You can then email your comments to 6952 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6952; Package emacs. (Mon, 30 Aug 2010 23:52:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Colascione <dan.colascione <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Aug 2010 23:52:01 GMT) Full text and rfc822 format available.

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

From: Daniel Colascione <dan.colascione <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: jit-lock with default, small chunk-size causing incorrect
	fontification in cc-mode
Date: Mon, 30 Aug 2010 16:52:45 -0700
[Message part 1 (text/plain, inline)]
I've attached a file that demonstrates incorrect fontification with
cc-mode and jit-lock used together -- the last function in the file is
not fontified as a function when a file is first visited with
jit-lock-chunk-size equal to its default 512. If I change that to
32768 or change some of the whitespace in the fiile, fontification is
correct again. I've attached the file because the testcase is
whitespace-sensitive.

Presumably, the underlying cause is jit-lock asking cc-mode to start
or stop fontification in an unexpected place.
[foo.c (application/octet-stream, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#6952; Package emacs,cc-mode. (Tue, 31 Aug 2010 10:13:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Daniel Colascione <dan.colascione <at> gmail.com>
Cc: 6952 <at> debbugs.gnu.org
Subject: Re: bug#6952: jit-lock with default,
	small chunk-size causing incorrect fontification in cc-mode
Date: Tue, 31 Aug 2010 10:29:35 +0200
> Presumably, the underlying cause is jit-lock asking cc-mode to start
> or stop fontification in an unexpected place.

I doubt the error is in jit-lock, because the assumptions made by
jit-lock.el are almost identical to the ones made by the non-jit-lock
code.  Jit-lock relies more heavily on some of those assumptions, tho,
so it's probably more difficult to reproduce without jit-lock, but
reproducing it without jit-lock might be the best way to debug
the problem.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org, bug-cc-mode <at> gnu.org:
bug#6952; Package emacs,cc-mode. (Fri, 29 Jun 2018 23:06:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Daniel Colascione <dan.colascione <at> gmail.com>
Cc: 6952 <at> debbugs.gnu.org
Subject: Re: bug#6952: jit-lock with default,
 small chunk-size causing incorrect fontification in cc-mode
Date: Fri, 29 Jun 2018 19:05:38 -0400
tags 6952 + unreproducible
quit

Daniel Colascione <dan.colascione <at> gmail.com> writes:

> I've attached a file that demonstrates incorrect fontification with
> cc-mode and jit-lock used together -- the last function in the file is
> not fontified as a function when a file is first visited with
> jit-lock-chunk-size equal to its default 512.

I can't reproduce this, neither by setting jit-lock-chunk-size to 512,
nor with the default of 500.  The fontification of that file looks fine.
Tested from 24.3 to current master (27.0.50).






Added tag(s) unreproducible. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 29 Jun 2018 23:06:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Thu, 26 Sep 2019 11:13:01 GMT) Full text and rfc822 format available.

Notification sent to Daniel Colascione <dan.colascione <at> gmail.com>:
bug acknowledged by developer. (Thu, 26 Sep 2019 11:13:01 GMT) Full text and rfc822 format available.

Message #18 received at 6952-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 6952-done <at> debbugs.gnu.org, Daniel Colascione <dan.colascione <at> gmail.com>
Subject: Re: bug#6952: jit-lock with default, small chunk-size causing
 incorrect fontification in cc-mode
Date: Thu, 26 Sep 2019 13:11:39 +0200
[Message part 1 (text/plain, inline)]
Noam Postavsky <npostavs <at> gmail.com> writes:

> tags 6952 + unreproducible
> quit
>
> Daniel Colascione <dan.colascione <at> gmail.com> writes:
>
>> I've attached a file that demonstrates incorrect fontification with
>> cc-mode and jit-lock used together -- the last function in the file is
>> not fontified as a function when a file is first visited with
>> jit-lock-chunk-size equal to its default 512.
>
> I can't reproduce this, neither by setting jit-lock-chunk-size to 512,
> nor with the default of 500.  The fontification of that file looks fine.
> Tested from 24.3 to current master (27.0.50).

I can't reproduce this either, so I'm closing this bug report.  If anyone
is still seeing this on a modern Emacs, please re-open.

Best regards,
Stefan Kangas
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Oct 2019 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 322 days ago.

Previous Next


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