bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time


From: Tassilo Horn
Subject: bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time
Date: Wed, 22 Apr 2015 22:32:14 +0200
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> Another and even reproducible case is `report-emacs-bug'.  It goes
>> like this:
>> 
>>   1. emacs -Q
>>   2. eval my above settings in *scratch*
>>   3. M-x report-emacs-bug
>> 
>> The new message buffer is completely unfontified initially.  As soon
>> as you move point, font-lock kicks in and the header lines get their
>> proper fontification.  Or maybe it's the other way round, i.e., the
>> buffer is created, then redisplayed, then the fontification takes
>> place but no redisplay is performed thereafter.
>
> Sounds like the idle timer that is started by jit-lock-defer-time
> never runs after the buffer is displayed.

Indeed, that's the case.  Or wait, it eventually runs but much later
than `jit-lock-defer-time' defines.

> Could it be that it already ran before the display?

No.  The bug report buffer is displayed first, and then it takes two or
three seconds until the first jit-lock kicks in.  And then the buffer
will be redisplayed and appears fontified.

I tested using this code:

--8<---------------cut here---------------start------------->8---
(progn
  (setq jit-lock-defer-time 0.0312
        jit-lock-stealth-nice 0.117
        jit-lock-stealth-time 0.23)

  (require 'cl-lib)
  (defvar i 0)
  (advice-add 'jit-lock-deferred-fontify :before
              (lambda ()
                (message "DEFERRED FONTIFY %s" (cl-incf i)))))
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo





reply via email to

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