From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#69431: 30.0.50; Strange fontificaion behavior Date: Mon, 01 Apr 2024 10:59:13 +0000 Message-ID: <87plv98i2m.fsf@localhost> References: <871q8x6e06.fsf@mail.parknet.co.jp> <86msrlu87i.fsf@gnu.org> <87v869oklj.fsf@localhost> <86il29u4hy.fsf@gnu.org> <87sf1dogi8.fsf@localhost> <87h6hi8d87.fsf@mail.parknet.co.jp> <86il1g2dfd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22557"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69431@debbugs.gnu.org, =?UTF-8?Q?Bj=C3=B6rn?= Bidar , Eli Zaretskii , Stefan Monnier , hirofumi@mail.parknet.co.jp To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 01 13:00:26 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rrFOr-0005e2-P7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Apr 2024 13:00:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrFOS-0001kt-HF; Mon, 01 Apr 2024 07:00:00 -0400 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 1rrFOR-0001kf-H7 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 06:59:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrFOR-0005AJ-9D for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 06:59:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrFOU-0006WC-04 for bug-gnu-emacs@gnu.org; Mon, 01 Apr 2024 07:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Apr 2024 11:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69431 X-GNU-PR-Package: emacs Original-Received: via spool by 69431-submit@debbugs.gnu.org id=B69431.171196915724967 (code B ref 69431); Mon, 01 Apr 2024 11:00:01 +0000 Original-Received: (at 69431) by debbugs.gnu.org; 1 Apr 2024 10:59:17 +0000 Original-Received: from localhost ([127.0.0.1]:49707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrFNk-0006Uc-I9 for submit@debbugs.gnu.org; Mon, 01 Apr 2024 06:59:17 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:54691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrFNh-0006UN-Hg for 69431@debbugs.gnu.org; Mon, 01 Apr 2024 06:59:14 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8B6AC240105 for <69431@debbugs.gnu.org>; Mon, 1 Apr 2024 12:59:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711969144; bh=DMRx46niPJ0anKXaER+DJnhbkXOlDUuFSVZmC5Ub0p0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Vpx2kN+XrlNUqOphCju7aw+PGULjq5WC8Cx+ZtCcjyxNdnHMdoQrkeEUN77Hg+l38 G6vBLdB9E7VqkpWajOalLpirRQzh5/MOHvFpL/GTHor32K4rNWaBiZfcaF/K3Jpco6 8wtproVnkYV8ZQJIAwz+nTEdmWAzlnzXjQ/ELHDzR7HGpHFsb6BV94idDrg+Usjric fv/v38aVcGsG4HM6+sL5rXMnl2xO5t8FSFTvMrXiuwjAH9OkaPWK2pg3VhCEwqNxQL VWSHVxcBvZW8GU1ycG90OAzQFXEyEs1M2t7PCs1nFhhofX+f8PN4+WAetR53F9K0ZX Wg9yH6WlT+TUQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V7SgT3bytz9rxB; Mon, 1 Apr 2024 12:59:01 +0200 (CEST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282466 Archived-At: Andrea Corallo writes: > I've applied the following: > > (defun font-lock-set-defaults () > ... > + (when (string= (buffer-name) "test.org") > + (add-variable-watcher 'font-lock-keywords #'k-variable-watcher)) > > Warm eln-cache (working fontification) > ================ > For information about GNU Emacs and the GNU system, type C-h C-a. > XXX set > backtrace() > k-variable-watcher(font-lock-keywords ... set #) > normal-mode(t) > > XXX set > backtrace() > k-variable-watcher(font-lock-keywords ... set #) > ... > jit-lock-function(1) > > Empty eln-cache (fontification broken): > ================ > For information about GNU Emacs and the GNU system, type C-h C-a. > XXX makunbound > backtrace() > k-variable-watcher(font-lock-keywords nil makunbound #) > kill-local-variable(font-lock-keywords) > org-set-font-lock-defaults() > org-mode() > ... > XXX set > backtrace() > k-variable-watcher(font-lock-keywords (t nil) set nil) > ... > jit-lock-function(1) > > ================ > > So from what I see in the non working example 'font-lock-keywords' is > cleared at the end of 'org-set-font-lock-defaults' which does > '(kill-local-variable 'font-lock-keywords)'. > > Now why this is not happening in the working example I'm not sure ATM, > ('org-set-font-lock-defaults' is not even called there AFAICS). I am pretty sure that it does get called, but before your variable watcher becomes active. I suspect that font-lock is dumped to Emacs. Maybe related to bug#66741. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at