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.bugs Subject: bug#56637: 28.1.90; [FR] Allow a way around font-lock-mode being unconditionally disabled in " *hidden*" buffers Date: Thu, 21 Jul 2022 15:49:38 +0300 Message-ID: <83tu7amxzx.fsf@gnu.org> References: <874jzdhh5m.fsf@localhost> <837d49ntwg.fsf@gnu.org> <874jzc4e1x.fsf@localhost> <837d48m332.fsf@gnu.org> <87zgh21xbg.fsf@localhost> <831queodmg.fsf@gnu.org> <87r12e1vq0.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29052"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56637@debbugs.gnu.org, monnier@iro.umontreal.ca To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 21 14:56:34 2022 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 1oEVjG-0007N3-FA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Jul 2022 14:56:34 +0200 Original-Received: from localhost ([::1]:49394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEVjF-0001el-BT for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 21 Jul 2022 08:56:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEVcx-00036V-4W for bug-gnu-emacs@gnu.org; Thu, 21 Jul 2022 08:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEVcw-0000ds-PB for bug-gnu-emacs@gnu.org; Thu, 21 Jul 2022 08:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEVcw-0001XE-Dd for bug-gnu-emacs@gnu.org; Thu, 21 Jul 2022 08:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jul 2022 12:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56637 X-GNU-PR-Package: emacs Original-Received: via spool by 56637-submit@debbugs.gnu.org id=B56637.16584077945880 (code B ref 56637); Thu, 21 Jul 2022 12:50:02 +0000 Original-Received: (at 56637) by debbugs.gnu.org; 21 Jul 2022 12:49:54 +0000 Original-Received: from localhost ([127.0.0.1]:36879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEVcn-0001Wl-O0 for submit@debbugs.gnu.org; Thu, 21 Jul 2022 08:49:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEVcl-0001WX-Ll for 56637@debbugs.gnu.org; Thu, 21 Jul 2022 08:49:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51406) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEVcg-0000ZZ-7O; Thu, 21 Jul 2022 08:49:46 -0400 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=MyxCvrW4f3tqhMAeOOce6RkxPEIZuYo9GhcBp6OLH60=; b=sdsulBWiRYG/ tOqZdIiG23sD+bjUIR4Yova/ZGsBdccbpE4IZpAbS4093Mkok4gXSc8RBJ3uYEjZok4xYFnKvPHf7 Fs/0dz66aQO++25BAbWiXcI/KWruJvomagvkSsEsyioozdHpT/rPEa3dj18djMCCT08bpvHJIQvJv bJ3PULHizH8+odrxYpnj6BU7JRSO8rwPtzgOr8cyzam+x20o8lx7/YG91HAdInweznqJWaj/zTv+O hsSrovhhkZdBi0KJtuXKfla3q7zOC/C3O2MezhZortFJYSiH6RT93+JsV/yqlgSaBXo/ZexIqI1i3 ag3cv+F/yeenqbcAJd24rg==; Original-Received: from [87.69.77.57] (port=3959 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEVcf-0002tL-EP; Thu, 21 Jul 2022 08:49:46 -0400 In-Reply-To: <87r12e1vq0.fsf@localhost> (message from Ihor Radchenko on Thu, 21 Jul 2022 20:44:23 +0800) 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" Xref: news.gmane.io gmane.emacs.bugs:237553 Archived-At: > From: Ihor Radchenko > Cc: monnier@iro.umontreal.ca, 56637@debbugs.gnu.org > Date: Thu, 21 Jul 2022 20:44:23 +0800 > > > Sorry, I don't understand: once Emacs loads a major mode, it stays > > loaded, unless you forcibly unload it. Or what do you mean by "load > > major mode"? > > If fontification is done in temporary throwaway buffers that are closed > immediately after fontification, next portion of text that should be > fontified in the same major mode will need to create a new throwaway > buffer, turn on the relevant major mode, and perform fontification. > Hence, major mode will need to be loaded every single time we need to > fontify a text fragment. It is not "loaded", it is "activated". "Loading" in Emacs means loading the Lisp package that implements the mode, and that is done only once. We don't unload packages when buffers are killed. > > And why do you assume that erasing a buffer and then inserting some > > text into it will be significantly faster than turning on a mode in > > it? It sounds like another fragile assumption. > > It is usually true from my experience. Well, "usually" is not a guarantee it will always be so. Anyway, if this is the issue, we could add another way of marking a buffer as "invisible for user", one that is not based on the buffer's name. > (5.531764251 0 0.0) > (0.012424528 0 0.0) > > Over 400x difference. Sorry, but this proves nothing, and I'm sure you know it. To me, this is just one more fragile assumption on which Org code is based that is bound to be broken some day.