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: Fri, 12 Mar 2021 09:20:29 +0200 Message-ID: <83wnucltxe.fsf@gnu.org> References: <87a6sbg41o.fsf@gnus.org> <87lfatirk1.fsf@gnus.org> <83blbpmy2x.fsf@gnu.org> <837dmdmw60.fsf@gnu.org> <831rclmoy0.fsf@gnu.org> <83zgz9l9xw.fsf@gnu.org> <30f0a4188eb516fc37ed@heytings.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20083"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 12 08:21:51 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 1lKc7L-000573-H8 for ged-emacs-devel@m.gmane-mx.org; Fri, 12 Mar 2021 08:21:51 +0100 Original-Received: from localhost ([::1]:39796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKc7K-00050c-40 for ged-emacs-devel@m.gmane-mx.org; Fri, 12 Mar 2021 02:21:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKc64-0004OC-Cc for emacs-devel@gnu.org; Fri, 12 Mar 2021 02:20:32 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54781) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKc61-0003bz-Oi; Fri, 12 Mar 2021 02:20:31 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3704 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lKc5y-0004cD-PK; Fri, 12 Mar 2021 02:20:28 -0500 In-Reply-To: <30f0a4188eb516fc37ed@heytings.org> (message from Gregory Heytings on Thu, 11 Mar 2021 21:57:18 +0000) 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:266382 Archived-At: > Date: Thu, 11 Mar 2021 21:57:18 +0000 > From: Gregory Heytings > cc: emacs-devel@gnu.org > > 2. That being said, font-lock-fontify-block is not a good solution to that > problem, it doesn't work when the yanked text is larger than 16 lines, > except of course with a prefix argument. I guess 16 lines is really beyond anything I ever needed to deal with in this use case, because I don't remember ever having such problems. "M-o M-o" is convenient here because I need to remember only a single command to "fix" any issues with faces, whether it means re-fontify the block or "un-fontify" it. I'm okay with any other command to perform the same duty, as long as its key-binding is convenient to type ("C-x x ..." is less convenient, because it requires me to release the Ctrl key half-way through the sequence). > 4. Is this not something that could/should be done inside yank, with (if > font-lock-mode (font-lock-fontify-region (point-min) (point-max)))? I don't think we can make such behavior changes in yank at this point. And even if we did, we will never be able to make sure "wrong" faces aren't left after some command, so a convenient command to fix fontification will always be needed, IMO.