From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Any expert on font-lock machinery able to provide some insight Date: Fri, 03 Jan 2025 15:32:02 +0200 Message-ID: <86cyh4gh0t.fsf@gnu.org> References: <67d9db0a-ba0f-4164-83fd-796089a6e40b@gmx.de> <86ikqwgldg.fsf@gnu.org> <91114d5a-4af9-4ae1-b7c9-b673e5edf25e@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4467"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Harald Kirsch Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 03 14:33:23 2025 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tThnl-0000zh-VU for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Jan 2025 14:33:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tThmw-0000Cv-Iw; Fri, 03 Jan 2025 08:32:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tThmj-0000BC-6f for emacs-devel@gnu.org; Fri, 03 Jan 2025 08:32:18 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tThmZ-0000WA-0x; Fri, 03 Jan 2025 08:32:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fxSorlRf7Jmgb0i2ip3Nf5W09pOh5nwuoFvhqjiw+WA=; b=oNmodgK5GtGe oO9SFX+tRvizOt9d3gnl/a8BQ4tLdYODrQtzYGbzlc7kuTDGIRtUlpVLQTwkPVIK8m97KUnmVbHJI 7jORgK2oe+OtJvhFb9pqHpeghIj4b8XH7y1lTnFpOZq8+i415v41/kS/Xiihg1tEM8zFaatL2+QuH lRQq4iTeD1+EI70HMmzCDqRy1lMS+rJ7qNSjzYOCylFeZynhv2ju5Xy1avW9B5FuNLc/svl4k3ixR bWVPwKUn9lqeLlr77DTTcFtQ+FNI3ZiGLVH2UaEhlDyvwlRfsnCVPlHdMIn6KAAlvORcRZgMu7hUl BcpK1NLyYi7hFFY7a45Wgg==; In-Reply-To: <91114d5a-4af9-4ae1-b7c9-b673e5edf25e@gmx.de> (message from Harald Kirsch on Fri, 3 Jan 2025 13:44:04 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327626 Archived-At: [Please use Reply All, to keep the list CC'ed.] > Date: Fri, 3 Jan 2025 13:44:04 +0100 > From: Harald Kirsch > > Hi Eli, > > thanks for the explanation. > > On 03.01.25 12:58, Eli Zaretskii wrote: > ... > >> But it seems I am missing another channel of information which triggers > >> font-locking too often. > > > > Why does it bother you that it happens too often? > > 1. I compare with elisp font-locking which is much less frequent. > > 2. It is eglot-semtok, which does an LSP server call to get font-lock > information. It is quick enough and I wouldn't have noticed without the > logging, but it seems a waste nevertheless. > > >> With describe-char I do see > >> > >> There are text properties here: > >> fontified defer > >> > >> not going away. Can this point to the problem? > > > > This should only happen with buffer positions that were not yet > > fontified. If the buffer position was already fontified, the value > > should be t. > > The buffer position was already fontified, so I should not see this. I > might be doing something wrong so that the font-lock machinery thinks, > font-locking did not happen. The actual fontification happens > asynchronously (due to the server roundtrip), but I thought I had given > the engine enough info pretending all is done. I don't fully understand, > how the decision is made to fontify again. > > Cheers > Harald >