unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: emacs-devel@gnu.org
Subject: Re: Partly deferred font-locking?
Date: Thu, 12 Jan 2023 16:13:06 +0200	[thread overview]
Message-ID: <83a62nc03x.fsf@gnu.org> (raw)
In-Reply-To: <87ilhbg8dw.fsf@web.de> (message from Michael Heerdegen on Thu, 12 Jan 2023 15:00:43 +0100)

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Date: Thu, 12 Jan 2023 15:00:43 +0100
> 
> > If so, you'd need to change the 'fontified' property to
> > have more than just a boolean value, and you'd need a special timer
> > which examined the 'fontified' property and applied more highlighting
> > if the value says it wasn't applied yet.
> 
> That would have to be done in Emacs, not in my code, right?

Depends on whether the additional highlighting will be part of
jit-lock.el or not.  The display engine only cares whether the value
of 'fontified' is nil or not.

> > Please note that expensive highlighting might make Emacs less
> > responsive.
> 
> 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.  IOW, if some fontification is
expensive and doesn't itself test quit-flag, you cannot interrupt it
in the middle by wrapping it with while-no-input.  You are
specifically talking about accessing the filesystem, which means you
will call some file I/O C API, and those won't be interrupted.



  reply	other threads:[~2023-01-12 14:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 17:15 Partly deferred font-locking? Michael Heerdegen
2023-01-11 17:43 ` [External] : " Drew Adams
2023-01-11 18:33   ` Michael Heerdegen
2023-01-11 18:38     ` Drew Adams
2023-01-11 18:49       ` Drew Adams
2023-01-11 19:31         ` Michael Heerdegen
2023-01-11 17:45 ` Eli Zaretskii
2023-01-11 18:36   ` Michael Heerdegen
2023-01-11 19:58     ` Eli Zaretskii
2023-01-12 13:14       ` Michael Heerdegen
2023-01-12 13:45         ` Eli Zaretskii
2023-01-12 14:00           ` Michael Heerdegen
2023-01-12 14:13             ` Eli Zaretskii [this message]
2023-01-12 14:26               ` Ihor Radchenko
2023-01-12 14:30                 ` Ihor Radchenko
2023-01-12 14:36                   ` Eli Zaretskii
2023-01-12 14:44                     ` Ihor Radchenko
2023-01-12 15:11                       ` Eli Zaretskii
2023-01-12 15:40                         ` Ihor Radchenko
2023-01-12 14:30                 ` Eli Zaretskii
2023-01-12 14:36                   ` Ihor Radchenko
2023-01-12 14:38                   ` Michael Heerdegen
2023-01-12 14:33               ` Michael Heerdegen
2023-01-12 15:51                 ` Eli Zaretskii
2023-01-12 16:02                   ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a62nc03x.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).