Subject: Re: bug#15045: Point jumps inappropriately around time of Semantic lexing

From: David Engster <[email-masked]>
Date: Fri, 09 Aug 2013 07:36:07 +0200

Eli Zaretskii writes:
>> From: David Engster <[email-masked]>
>> Cc: Stefan Monnier <[email-masked]>,
>> [email-masked], "Eric M. Ludlam" <[email-masked]>, Eli
>> Zaretskii <[email-masked]>
>> Date: Thu, 08 Aug 2013 22:30:26 +0200
>> 
>> However, doing redisplay in timers is not nice.
>
> Why not?

Because doing redisplay is a user-visible side effect, and in general,
timers shouldn't have those. AFAICS, any function that calls things like
`accept-process-output', `input-pending-p' or `sit-for' inside a
`save-excursion' might get an unwanted scrolling effect if point is
temporarily moved to some invisible location.

In fact, I just understood another bug in speck-mode (which is similar
to flycheck). I sometimes had unwanted scrolls there, too, and I now saw
that those also happen at every full minute while typing.

>> > Doesn't deferred jit locking necessarily have to call redisplay?
>> 
>> I would think so, too.
>
> But since jit-lock-deferred-fontify only happens when Emacs is idle,
> there's no problem with that, since Emacs enters redisplay also when
> it is idle.

I thought that the jit-lock timer is a non-idle timer, but you are
right.

-David