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: Tue, 26 Jul 2022 13:21:44 +0800 Message-ID: <87fsiocutz.fsf@localhost> References: <874jzdhh5m.fsf@localhost> <871qug4dyk.fsf@localhost> <87wnc61x8a.fsf@localhost> <87h735v94w.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="13150"; 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 Tue Jul 26 07:21:23 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 1oGD0V-0003BK-LZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Jul 2022 07:21:23 +0200 Original-Received: from localhost ([::1]:50826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGD0T-0006Ii-Ad for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Jul 2022 01:21:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGD0A-0006IY-C4 for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 01:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34009) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGD0A-0005HG-2t for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 01:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oGD09-0003AB-Sh for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2022 01:21: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: Tue, 26 Jul 2022 05:21: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.165881285412114 (code B ref 56637); Tue, 26 Jul 2022 05:21:01 +0000 Original-Received: (at 56637) by debbugs.gnu.org; 26 Jul 2022 05:20:54 +0000 Original-Received: from localhost ([127.0.0.1]:51989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGD01-00039J-Kf for submit@debbugs.gnu.org; Tue, 26 Jul 2022 01:20:54 -0400 Original-Received: from mail-pl1-f171.google.com ([209.85.214.171]:45849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oGCzu-00038t-3S for 56637@debbugs.gnu.org; Tue, 26 Jul 2022 01:20:52 -0400 Original-Received: by mail-pl1-f171.google.com with SMTP id w7so12309352ply.12 for <56637@debbugs.gnu.org>; Mon, 25 Jul 2022 22:20:46 -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=kQ4h3VQ+VN8vmPLpjMQYKW71obdt1nuNt3JznYCkH3U=; b=bQIKGEJ/juxOR42DfN6zbl83CaOAtYKmLBgTDwV3zazfKYpEceOjYdKWFbY9S3PGYy Dri3H7tImqPqVo41zKHNm5/GE1/Q8OJtaXEIRWg2M+dLehza6KTcEM8DkmMedMqAiGZY P4uCqhAoQg8YoN3AVcI/hYvKPUsA7zeVgddF7nRyNYduhvna3ga2EbsMmhj3iVeXNV2a r436I8fDVoQS2XftPOeQGXwAqcDW54OjHyyZTXS/l9BgD6D1Ld6pqNjqRfv/ZHYX1tJy sv3JGGOQ2K0lhjZiIZCwnUxWmzAtGH4VIvAs12bbc2d7eDytTcB7fW9Kj4MtU2Tx/org dxgg== 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=kQ4h3VQ+VN8vmPLpjMQYKW71obdt1nuNt3JznYCkH3U=; b=0Nm27tdB9pVC2kzFZqigzCIDsVHm0k9crO+6QgtOrLaIjSOZaL/m1ruWA84o7FETc5 ZAOz9SXGQiEUDXG9qnyUt3HFY6y2k6oSe586vEhjhQfHCbCG5rF5gOHWmWvDpyqBu/cl gQ1XHDTz7f+gp0+MqzKps3uM4G3CX3Pr9/eWd/UZ9iqGJ92eNA2KL1mgSjuF+6bwNuTd fcLiUYTz6HZkWqZz+UNrvMzC3lME8i25/v/Wh5wVPp7v+tJvs6ZsksQafQNP1XX6euff Q3XGOVg3iqRkFjruXb7Zy5VYV7M7LKTVsI59gbtl8GKfPRLh3xRZ+VmZbSm9Z8hQd/cG I6Ig== X-Gm-Message-State: AJIora8PmOQG4M5oGNoT+giv3mWj/8fKGiOt8pLyGoGsR77PJ0wx/Rkn ql1gS5y0sT0JqQxWM5c+zUg= X-Google-Smtp-Source: AGRyM1vjz2DJ091X60em+bsqTV8UBA53ikDLJwwcwcJz3oadnRsMv4nNJShKU9LZ8TmiEPQfibt+Fw== X-Received: by 2002:a17:90b:3148:b0:1ef:e4ce:1ebf with SMTP id ip8-20020a17090b314800b001efe4ce1ebfmr17432142pjb.220.1658812840046; Mon, 25 Jul 2022 22:20:40 -0700 (PDT) Original-Received: from localhost ([115.154.175.57]) by smtp.gmail.com with ESMTPSA id w7-20020a17090a460700b001f260b1954bsm350310pjg.13.2022.07.25.22.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 22:20:39 -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:237923 Archived-At: Stefan Monnier writes: >> 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. > > You're slowly inching toward a concrete case, but it would be much > simpler and faster to just give a recipe telling what you do, what you > see, and what you'd like to see instead. > You know: a normal bug report. I am sorry, but there is no useful bug to report here. I had an actual bug report along the lines: 1. Install web-mode 2. Configure Org mode to use web-mode for html 3. Create html src block in Org mode 5. Fontification does not work The issue was disabled font-lock-mode in temporary buffer + web-mode directly setting font-lock-face. I have fixed this on Org side by explicitly copying font-lock-face property instead of relying on font-lock-face being remapped to face. Then, I posted the bug to emacs-devel because (1) I was not sure if copying face-lock-face is a reliable option (it is, as we figured); (2) Similar issues might popup as a result of font-lock-mode being disabled in temporary buffers/noninteractive mode. Best, Ihor