From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iEdIOOQs6WJ4PwAAbAwnHQ (envelope-from ) for ; Tue, 02 Aug 2022 15:55:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MPVrN+Qs6WK1fwAAG6o9tA (envelope-from ) for ; Tue, 02 Aug 2022 15:55:48 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7909F31D33 for ; Tue, 2 Aug 2022 15:55:48 +0200 (CEST) Received: from localhost ([::1]:45808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIsN9-0000E3-E0 for larch@yhetil.org; Tue, 02 Aug 2022 09:55:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIsLw-0000Cq-RW for emacs-orgmode@gnu.org; Tue, 02 Aug 2022 09:54:32 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:35640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIsLu-00075J-PI for emacs-orgmode@gnu.org; Tue, 02 Aug 2022 09:54:32 -0400 Received: by mail-pj1-x102e.google.com with SMTP id x2-20020a17090ab00200b001f4da5cdc9cso8461505pjq.0 for ; Tue, 02 Aug 2022 06:54:29 -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=lDCnl7x9g0tQ77FReGcEWzHiyLqfLb5ULpWt22eePGY=; b=Aa2qLNslDWxyl2A41JYozgsaWfMcpk9M6t5PMoLbF9gJSMF1p/DG2uXQmrWMzGjQUX UUeSJt8vwSy0n2CH3ybkOwcH+XPpTNbQbZp/gg4mPGued6AGfJiTPfHTeZi3xLVBebRo iqM15VCySoIbN3h/hvQW2Jh6sLnGHRZMb9XK2ePpUEngfBtbQSSADHDq50rbK0v8h8EV tyH9jKsPXpS1gWtn1xjPq7cTVjz0/y8qo7XX9FadfyH/+c+K5e9nSbHQ9El6cqpYEuDr Jt2sqrxAKYwBtW/3eg/2CDzhTWKPv0TN939vMU/qAUtMYxNiHZnvB4U5jQ7cQDxEdQNy RXkA== 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=lDCnl7x9g0tQ77FReGcEWzHiyLqfLb5ULpWt22eePGY=; b=xC/O2bzYUDXRqjrYimCCNBe8daX/mV5gkQXnSr2Ubc2eh8c7XcdX3l0HTQ/IByabGq 9O5EKFhDLKdJhafczzGDc7YSWyXs7WW1K3O8PDqNg2yVqznIAxGuxcpkeLF5Bnc7qxF6 ewO2eeQ4GEs8U7ZH+tqhp5AB6NvKPYx8lJYB0rjCkSwxfOQmWAPGMTBCJ1fUbWYhhvct 6mOSK4je8ayyBXEETwILp6p1iGPnBv7XTDF0fhOU3wUe7SSyRh4NLFsgcMs4+d3ybNok d+HKnBXvbGqW9+YcftkegWFvXU7NMm+xRTjHGpDYiy0rBwqp1dKDS5Szl31NNJgQ2GqA 0HEw== X-Gm-Message-State: ACgBeo3kTRRhJfyWNSfaG2NiN34Qq6cJcPjqVAraczzhMBOSn+uaSOuJ eixx74jBhLyjBNlYjuvcEaQ= X-Google-Smtp-Source: AA6agR40MJva0yfHD5vM8wGLMzXgokh2apCer6e0y0+vEFsGetC35EyeRwoGKH3KgPGckDszzxG6pg== X-Received: by 2002:a17:90a:7bc7:b0:1f4:e5a5:3b6b with SMTP id d7-20020a17090a7bc700b001f4e5a53b6bmr15974706pjl.93.1659448467870; Tue, 02 Aug 2022 06:54:27 -0700 (PDT) Received: from localhost ([2409:8a70:2b5:4040:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id l10-20020a170902f68a00b0016d95380e8esm12123928plg.140.2022.08.02.06.54.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 06:54:26 -0700 (PDT) From: Ihor Radchenko To: m43cap@yandex.com Cc: emacs-orgmode@gnu.org Subject: Re: commit e22b4eb7 kills formatting & color In-Reply-To: <877d3qzsc6.fsf@yandex.com> References: <871qu0jo1w.fsf@yandex.com> <87bkt4ktfn.fsf@localhost> <877d3sm75n.fsf@yandex.com> <878ro8kqwv.fsf@localhost> <87v8rckp6c.fsf@yandex.com> <87r120kodw.fsf@yandex.com> <871qtylsjj.fsf@localhost> <877d3qzsc6.fsf@yandex.com> Date: Tue, 02 Aug 2022 21:55:32 +0800 Message-ID: <87v8rakawb.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659448548; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=lDCnl7x9g0tQ77FReGcEWzHiyLqfLb5ULpWt22eePGY=; b=Ru/LS1Vc1lRVXZnEKUeI/UFOmEvXUkR7Hjduj2laUPP4GYd1mJo/VTG92I4ZmcF/OYQyCy +0YSnmbc/n//rUch2aVInLCAgl5dpgbb7aZ2AOtVfonZrFUsC3KgEM+PhcgSq11mTgQvFF E2y6RP+f4p46jH9C8hLhup2M4dx3CNyyHOvXflMTdp+mshOHN5Bb27EfAmd9iTRlO7spD5 adLFlx+0cGddigCdLVHhiLod8X4wQxEsVeB8IquhQ3qD4bUJ86vMbjhlwHERIpzrH8NN+i kcPDZo9pe0/MeV0HSUTV4aO5PLN32GOs4NJ0K1V8nrZF598ow+JJ26WHcLs1dQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659448548; a=rsa-sha256; cv=none; b=FffTQrPqkBZYM7JvJE1Iwjf2d0Edxk5VWyufIFZVz7uDGFTQCD8X1E9MB5NrY0w13WtVTP LoJBZ65n0T1P7c06ZJ1TDb1zsyn4tYQtSMiLbdG3xExNNnEKS1d2HIUAD5PxC8CNGk2NEw ZIvF+tuAQdJJ5H1KUJeQph29P85I2KefL/yxhw4i1Pj8Ka5thWi/QuOx/y7uqnbfTW8ke7 2vlCHniSd46eNdm+EoOQwx4MSF47AfGWfBkpHcHgHMgkvRz21D6mLOBdDL/vW6XBL9JvL2 h4Eu2S88CJqC8qORJctNqgDMLsdxRfMoaPdLzbg7Ya5Rm2+utYqBzrj72egaEg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Aa2qLNsl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.92 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Aa2qLNsl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7909F31D33 X-Spam-Score: -3.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2ymDigmRnY1M --=-=-= Content-Type: text/plain Colin Baxter writes: > I disable popups so I always receive a buffer with: > > --8<---------------cut here---------------start------------->8--- > The local variables list in test.org > or .dir-locals.el contains values that may not be safe (*). Thanks! Can you try the attached patch? Best, Ihor --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-mode-Prevent-early-fontification.patch >From 8348c62250d2ef92da92416ae13d91289b2abe01 Mon Sep 17 00:00:00 2001 Message-Id: <8348c62250d2ef92da92416ae13d91289b2abe01.1659448323.git.yantar92@gmail.com> From: Ihor Radchenko Date: Tue, 2 Aug 2022 21:50:20 +0800 Subject: [PATCH] org-mode: Prevent early fontification * lisp/org.el (org-mode): Avoid triggering fontification when `hack-local-variables' popup window is displayed. Font-lock settings are not configured yet at this point. Fixes https://orgmode.org/list/87r120kodw.fsf@yandex.com --- lisp/org.el | 68 +++++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 214652364..f8977bba5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4708,37 +4708,43 @@ (define-derived-mode org-mode outline-mode "Org" \\{org-mode-map}" (setq-local org-mode-loading t) - ;; Apply file-local and directory-local variables, so that Org - ;; startup respects them. See - ;; https://list.orgmode.org/587be554-906c-5370-2cf2-f08b14fa58ff@gmail.com/T/#u - (hack-local-variables 'ignore-mode-settings) - (org-load-modules-maybe) - (org-install-agenda-files-menu) - (when (and org-link-descriptive - (eq org-fold-core-style 'overlays)) - (add-to-invisibility-spec '(org-link))) - (org-fold-initialize (or (and (stringp org-ellipsis) (not (equal "" org-ellipsis)) org-ellipsis) - "...")) - (make-local-variable 'org-link-descriptive) - (when (eq org-fold-core-style 'overlays) (add-to-invisibility-spec '(org-hide-block . t))) - (if org-link-descriptive - (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible nil) - (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible t)) - (setq-local outline-regexp org-outline-regexp) - (setq-local outline-level 'org-outline-level) - (when (and (stringp org-ellipsis) (not (equal "" org-ellipsis))) - (unless org-display-table - (setq org-display-table (make-display-table))) - (set-display-table-slot - org-display-table 4 - (vconcat (mapcar (lambda (c) (make-glyph-code c 'org-ellipsis)) - org-ellipsis))) - (setq buffer-display-table org-display-table)) - (org-set-regexps-and-options) - (org-set-font-lock-defaults) - (when (and org-tag-faces (not org-tags-special-faces-re)) - ;; tag faces set outside customize.... force initialization. - (org-set-tag-faces 'org-tag-faces org-tag-faces)) + ;; Disable `font-lock-mode' temporarily to delay fontification in case if + ;; `hack-local-variables' shows a popup window. Such a popup causes + ;; redisplay and triggers fontification too early. + (let ((org-font-lock-enabled-p font-lock-mode)) + (font-lock-mode -1) + ;; Apply file-local and directory-local variables, so that Org + ;; startup respects them. See + ;; https://list.orgmode.org/587be554-906c-5370-2cf2-f08b14fa58ff@gmail.com/T/#u + (hack-local-variables 'ignore-mode-settings) + (org-load-modules-maybe) + (org-install-agenda-files-menu) + (when (and org-link-descriptive + (eq org-fold-core-style 'overlays)) + (add-to-invisibility-spec '(org-link))) + (org-fold-initialize (or (and (stringp org-ellipsis) (not (equal "" org-ellipsis)) org-ellipsis) + "...")) + (make-local-variable 'org-link-descriptive) + (when (eq org-fold-core-style 'overlays) (add-to-invisibility-spec '(org-hide-block . t))) + (if org-link-descriptive + (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible nil) + (org-fold-core-set-folding-spec-property (car org-link--link-folding-spec) :visible t)) + (setq-local outline-regexp org-outline-regexp) + (setq-local outline-level 'org-outline-level) + (when (and (stringp org-ellipsis) (not (equal "" org-ellipsis))) + (unless org-display-table + (setq org-display-table (make-display-table))) + (set-display-table-slot + org-display-table 4 + (vconcat (mapcar (lambda (c) (make-glyph-code c 'org-ellipsis)) + org-ellipsis))) + (setq buffer-display-table org-display-table)) + (org-set-regexps-and-options) + (org-set-font-lock-defaults) + (when (and org-tag-faces (not org-tags-special-faces-re)) + ;; tag faces set outside customize.... force initialization. + (org-set-tag-faces 'org-tag-faces org-tag-faces)) + (font-lock-mode org-font-lock-enabled-p)) ;; Calc embedded (setq-local calc-embedded-open-mode "# ") ;; Modify a few syntax entries -- 2.35.1 --=-=-=--