From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id mFPTLPpXi2cEFQAA62LTzQ:P1 (envelope-from ) for ; Sat, 18 Jan 2025 07:27:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mFPTLPpXi2cEFQAA62LTzQ (envelope-from ) for ; Sat, 18 Jan 2025 08:27:54 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=UwbXfiJC; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1737185273; 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=mWk97sLePwGa5p11/68J1FIuFxoI+p7I/D1VN5cy2ZU=; b=fgg9fMwXOdtSq9ICYtz/SQ7xS/6QjRiqBDdBNx3V0eNyoZSgiE0+K3NyTPUm6hrdvtSXFC JxEXby5h6YFELO9PjAs7//KJjE5krgt3i1KKSWWKOc3GIoBw1EjqZzx84P3hqXQuKxMwb3 7MesknB7OxO1USI4/ZJogI93wW7wv0nxpU1R6TkkExPJnhhhGmctY2+RXlAM0kfaRSPg/Y w4v4HFuDkA3ljn0yqu6qB7dJSnneyL9r49oFW8i13vf0Na+z+cJm7IboJ29iw8O87lC4Ty f/nP3OsoPq1dmhj3fg67B6dQkvnmAZwyWVVeIHvANGw/c2crRgt0+/OW+6M9Kw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=UwbXfiJC; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1737185273; a=rsa-sha256; cv=none; b=Mc9BKbPKzg3baL+Gj8cTFAGcp2taPxTA2+l4ejJioDHU/S6uibUgNhiYHfZpFbL3XkRPQL /od6e/vFYxlI0S4jXWLYCH/Nkho0lEDdbtHAYuySwjZCuKXTiScY3oVvf9lYjm9FZaJJ6A vkJPPuFW9ZZZyy5py93M1hU8OT8vEE1Taca2eFn/pSwFjSX52nurcjDoVYLYhfuOkQnF27 ceUxmKXgH/gsiX6lVgObxbDRmohAYkJcPSKOa7bWuYXBYQlRuH4HJkLlafJPF3EiT2eo8p oOhUrchjbQ+3x/pseQsx/B7o44L3qMvPSezVeVQ1wc6ovZZVpXXWXoSZIKvEUg== 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 16BB479E31 for ; Sat, 18 Jan 2025 08:27:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tZ3F6-0004ma-RV; Sat, 18 Jan 2025 02:27:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tZ3F5-0004mS-UC for emacs-orgmode@gnu.org; Sat, 18 Jan 2025 02:27:39 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tZ3F3-000335-4s for emacs-orgmode@gnu.org; Sat, 18 Jan 2025 02:27:39 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9C031240028 for ; Sat, 18 Jan 2025 08:27:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1737185254; bh=28ZXoUrdXUtPySI/DuqhFQT7ipX5UAiohBH1nI+Yego=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=UwbXfiJC/QfdAXSUg7OfgW3MB3jI7GIcGSLEHyKXJyWnPTJCwtziiKGxwAY2p9Pts IbA4sHwcgjQ4oOWgSeQX4KiiwL66q4IAXbJgh/0DO2cvu6daSaNwwBNxzIcGaWryoI GeGtY2jXzzAdmLuuS6Cwcg4Eoq/tmWi2Q75INMgpgbKK7RBttfOUg3i/syh05aCa10 bpxS3MfqeT6/59GEyYtV70XAWsgL5Ndqnn43/+pzg1FRdgYHSYkyrcRUfBXDaiaEsN mGBtmkZ0degWN892jw3MGaLfiLLMChevZZGQai522pHjnYL4Qe2kPPphSEnOf1aZM2 AHOiHaj10JRaA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YZp8k1394z6tsb; Sat, 18 Jan 2025 08:27:34 +0100 (CET) From: Ihor Radchenko To: Ship Mints Cc: emacs-orgmode@gnu.org Subject: Re: Add org-src-is-fontify-buffer-p (patch attached) In-Reply-To: References: Date: Sat, 18 Jan 2025 07:29:51 +0000 Message-ID: <87sepgr34g.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 16BB479E31 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 0.07 X-Spam-Score: 0.07 X-TUID: IP6v2gVgPgpO Ship Mints writes: > I've added the predicate function org-src-is-fontify-buffer-p which can be > used in a prog-mode hook to avoid resource-intensive features such as eglot > inside a fontification buffer. This short example should make it clear. > > (defun my/emacs-lisp-hook () > (unless (and (featurep 'org) (org-src-is-fontify-buffer-p)) > (eglot-ensure))) Thanks! Do you have other examples where the new predicate could be useful apart from eglot? For eglot specifically, one can do a much simpler test - check for `buffer-file-name'. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at