[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: |
Thu, 23 Apr 2015 11:04:43 +0200 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> And here's why: _any_ command that goes through
> execute-extended-command will run this code:
>
> (when suggest-key-bindings
> (sit-for (cond
> ((zerop (length (current-message))) 0)
> ((numberp suggest-key-bindings) suggest-key-bindings)
> (t 2))))))
>
> The default value of suggest-key-bindings is t, so this means we
> _always_ sit-for 2 seconds, unless the echo area shows nothing (a rare
> situation in Emacs). When Emacs is parked inside sit-for, it doesn't
> become idle, I think for good reasons. So the idle timers will not
> run until those 2 sec have expired, or some input becomes available.
Oh, yes, this explains things.
> And indeed setting suggest-key-bindings to nil causes the buffer
> displayed by report-emacs-bug to become fontified almost immediately,
> under Tassilo's settings of jit-lock-defer-time.
Confirmed.
Hm, sometimes I actually like `suggest-key-bindings' namely whenever it
tells that I could have used `C-x <whatever>' instead of `M-x ...'. But
I don't like its suggestions to use `M-x fi-fi' instead of `M-x
find-file'.
I totally agree that sometimes there should be messages that should
stick around for a given amount of time but using `sit-for` to stop the
world turning as a whole seems like a bit overkill.
Maybe such sticky messages could be shown in the `header-line' and then
be removed by a timer. But of course, what should one do if the
header-line is already in use?
> The upshot of all this is that any command that displays a buffer via
> execute-extended-command and also says something in the echo area,
> will always delay JIT deferred fontifications (and any other features
> that run via idle timers) for at least 2 sec.
But how does that explain the occassionally non-fontified compile
buffers I get during package upgrades/installs? Those don't go through
`execute-extended-command'. But compile.el has some own `sit-for'
invocations that might delay timers.
Bye,
Tassilo
- bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time, (continued)
- bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time, Tassilo Horn, 2015/04/23
- bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time, Eli Zaretskii, 2015/04/23
- bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time, Stefan Monnier, 2015/04/23
- bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time, Eli Zaretskii, 2015/04/23
- bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time, Tassilo Horn, 2015/04/23
bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time, Eli Zaretskii, 2015/04/23
bug#20404: 25.0.50; Sometimes no fontification with jit-lock-defer-time, Tassilo Horn, 2015/04/23