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#56637: 28.1.90; [FR] Allow a way around font-lock-mode being unconditionally disabled in " *hidden*" buffers Date: Mon, 25 Jul 2022 17:23:11 +0800 Message-ID: <87h735v94w.fsf@localhost> References: <874jzdhh5m.fsf@localhost> <871qug4dyk.fsf@localhost> <87wnc61x8a.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35494"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56637@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 25 11:23:12 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 1oFuIw-000910-PJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jul 2022 11:23:10 +0200 Original-Received: from localhost ([::1]:44872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFuIv-00089E-Bo for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jul 2022 05:23:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFuIo-00088y-9o for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 05:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFuIo-0002Ol-18 for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 05:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFuIn-0004Nj-P1 for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 05:23:01 -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, 25 Jul 2022 09:23:01 +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.165874093516783 (code B ref 56637); Mon, 25 Jul 2022 09:23:01 +0000 Original-Received: (at 56637) by debbugs.gnu.org; 25 Jul 2022 09:22:15 +0000 Original-Received: from localhost ([127.0.0.1]:49271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFuI2-0004Md-RJ for submit@debbugs.gnu.org; Mon, 25 Jul 2022 05:22:15 -0400 Original-Received: from mail-pl1-f178.google.com ([209.85.214.178]:33657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFuHz-0004MO-L7 for 56637@debbugs.gnu.org; Mon, 25 Jul 2022 05:22:13 -0400 Original-Received: by mail-pl1-f178.google.com with SMTP id i3so5409827pld.0 for <56637@debbugs.gnu.org>; Mon, 25 Jul 2022 02:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=o5h52MVhj0BQrvMP1dEvMWkC3JuS0TSN7eWymwj7e1I=; b=WytiNa16y3IEQgaFJKW72zDaCmE54tDfTfb8r9sY+ucCNhQVWS9GUKEWl+R+wNenwT u/93gY733jntinBZOG1FgzaVlWn+VF+0wBGZGxGMoAhR1e7yY9EB/K+R8xnRri3k/6KD 0O/0uTPf32NI2d01Jw9+Wiqiqp68Lx0hegDwi+ET0fHEfsJ4aypxPo6Cihcghq+fy5l1 iplk+UiKZ32AC+KbLhNuwKxF7aWsj8+3PVrQqV1uDj9GzfRb4RNFL4esfi+YnLm5hpbL WoIlWyUdbNa5O58Z0hvl0eqq3c1JREWmDQFGwwIEDafAXQxVpztUXhWVJUwcIZU2rE0J aeSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=o5h52MVhj0BQrvMP1dEvMWkC3JuS0TSN7eWymwj7e1I=; b=Z9rrAtMrwAOE1MYgxIUf5xnLjaL5MDAA/CjotkuWjvH6aAHgxL2Yw3JUUG2fij92IO 8J/CA5/e89vmHukwGoZRzlhuAW8I46ITx2EBiCqDg5lWXCJ0C0gJ3ZrOJeosLFUaFOhR RcUTGFKjqN7TYHMRtFLVZHYzTMf0XVwMFqZTXjPUCoUvJLzi8sD/tKvd2L1SPbDO4UsF vzxNwCRH1mPzmakuZO56l67jIpygghlCsga4Cu/ArCkalmAr9zorekCCBPjJqyv3wnjR X/SIZmiDS+5pJdIIyb7d+Mmse+4pdTE7XvmO/M3F9a1AQY+IJAPmXsKtWC3lJrc1eawY 7Osg== X-Gm-Message-State: AJIora+rrEUUZJsJebCvxD3Rwe+tXZzUPlPShYllbT/n5B4FJwV99CkU WCjL3ofbMRnrCFhObHy2E7Q= X-Google-Smtp-Source: AGRyM1u9w15UZaIeYuOa0kldg7sJ1YpcaGt/CHmLk+6Y3Nyhw/cenVd539gf8kqei2ttc9tzO6R9YQ== X-Received: by 2002:a17:903:110c:b0:16c:cfae:e48c with SMTP id n12-20020a170903110c00b0016ccfaee48cmr11112526plh.12.1658740925745; Mon, 25 Jul 2022 02:22:05 -0700 (PDT) Original-Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id z14-20020a6553ce000000b003fbb455040dsm8018741pgr.84.2022.07.25.02.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 02:22:05 -0700 (PDT) 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" Xref: news.gmane.io gmane.emacs.bugs:237879 Archived-At: Stefan Monnier writes: >> When font-lock-mode is active, char-property-alias-alist contains >> '(face font-lock-face). > > Yes, I know, but it would really help to see a concrete case where that > makes a difference, because there are various ways to "fix" this > problem. They all have upsides and downsides. In my case, the main difference is in org-src-font-lock-fontify-block. Its purpose is copying the text fontification from major mode buffer to Org mode buffer. The copying is done by checking 'face and font-lock-extra-managed-props properties, which is sufficient as long as font-lock-mode is activated. When font-lock-mode is not activated, copying 'face is not enough, and we have to copy 'font-lock-face. >> Unless we can forever rely on the implementation detail that >> 'font-lock-face is always equivalent to the 'face property, > It's not really "equivalent", but more importantly it's not an > implementation detail: it's documented in the ELisp manual. Apart from 'font-lock-face, which can be copied explicitly, I do not see any real issues. Maybe only htmlize, which explicitly checks the value of font-lock-mode variable and does something strange if it is nil. Of course, htmlize is an external package. However, potentially, places that check font-lock-mode value and can be used noninteractively may be problematic: 1. align-rules-list 2. faces--attribute-at-point 3. font-lock-flush (it will fail to work when font-lock-mode is nil) 4. Info-fontify-node 5. c-toggle-comment-style 6. c-fontify-new-found-type 7. c-change-expand-fl-region 8. grep-process-setup 9. sh-set-shell 10. verilog-preprocess 11. reftex-show-entry Best, Ihor