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: font-lock-fontify-block Date: Thu, 11 Mar 2021 22:10:31 +0200 Message-ID: <831rclmoy0.fsf@gnu.org> References: <87a6sbg41o.fsf@gnus.org> <87lfatirk1.fsf@gnus.org> <83blbpmy2x.fsf@gnu.org> <837dmdmw60.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7595"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 11 21:11:44 2021 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 1lKRep-0001qk-IP for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Mar 2021 21:11:43 +0100 Original-Received: from localhost ([::1]:45394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKReo-0004vv-L0 for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Mar 2021 15:11:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKRdj-0003Y2-PO for emacs-devel@gnu.org; Thu, 11 Mar 2021 15:10:35 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55913) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKRdj-00020Q-1V; Thu, 11 Mar 2021 15:10:35 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2405 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lKRdg-0000hd-A4; Thu, 11 Mar 2021 15:10:33 -0500 In-Reply-To: (message from Stefan Monnier on Thu, 11 Mar 2021 12:52:27 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:266357 Archived-At: > From: Stefan Monnier > Cc: larsi@gnus.org, emacs-devel@gnu.org > Date: Thu, 11 Mar 2021 12:52:27 -0500 > > Do you have some general idea of what are the most common reasons for > the temporary mis-fontification? > > AFAIK usually misfontifications aren't temporary unless they're linked > to some multiline element, most commonly an unclosed string or comment > and those should get fixed automatically after a short delay. Probably. But also when fontification is highly context-dependent, I think. > So is it the case that the cases where you needed `M-o M-o` would > fix themselves after a short delay anyway (I'm OK with keeping such > a command for the case you don't want to wait, I'm just trying to > understand what it is that `M-o M-o` corrects). No, in most cases where I used it, the delay isn't short. More like infinite. > Would you be OK with the idea of deprecating the use of > `font-lock-fontify-block' for the specific case where font-lock is > not enabled? I only ever use it in that case to _remove_ the faces from text yanked from a fontified buffer. So that's another important use case for M-o M-o. > Also, I suspect that for your use case, we could have a general > "refresh" command, which just calls `font-lock-flush`, which would not > depend on the ill-defined notion of "block" (and wouldn't mess with the > mark). I'd have to use it for a while to have an opinion.