emacs-devel
[Top][All Lists]
Advanced

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

Re: Partly deferred font-locking?


From: Ihor Radchenko
Subject: Re: Partly deferred font-locking?
Date: Thu, 12 Jan 2023 14:26:13 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> So far I'm always using `while-no-input' and code that doesn't cause
>> trouble when it gets interrupted.  With that approach I had been able to
>> avoid this issue nearly completely.
>
> while-no-input is not a way to interrupt an on-going calculation,
> because it requires Emacs to check whether any input arrived, and
> Emacs only does that when it's idle.

Yet, there is observable difference.
AFAIK, helm does use `while-no-input' and I've seen helm being
non-blocking on functions that are not designed with interrupts in mind.
I suspect that you are missing something.

Also, on the subject of deferred font-locking:

More complex fontification may stumble on _editing_ long lines - if
fontification is performed line-by-line, long lines can slow down the
performance significantly (which is a known problem). It is often
a reasonable trade-off to defer re-fontification while editing a long
line and re-fontify it later. I have stumbled upon this issue myself in
my parser-based fontification for Org.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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