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 YG6/MMRBi2ffVwEA62LTzQ:P1 (envelope-from ) for ; Sat, 18 Jan 2025 05:53:08 +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 YG6/MMRBi2ffVwEA62LTzQ (envelope-from ) for ; Sat, 18 Jan 2025 06:53:08 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=aCZlGLDt; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1737179587; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=F38ZXYWuOmYFxfuPq0r7+ugLI+iVpHlMUog2NrWThuw=; b=irz3qLbgakSk2BUYAWEJ+Olc1MKArO7xwXFuyejKbJh3uN37Z/qIA0SDbYDg0RhzmWFhVs GmfgJPiQ/cUoLlPysuVz53H/kzE9ClvoK/BLpz/BHqOIi9gK5xiujF+PTjJNetefv7T1/s Tf6FbCRriq8GKHCJ5yqtO/WCYKt2BZxfHZ5ZSdsExse0UyVQ62DAsYdXoX7q2ZWnCG7kNA ahK3gpP7e/+THceCEY5rHFhkYpHtspEqfnl+rJ47Y4vML1Ik5OsgGMTcixWRrFPzGa7Obf k5X4E+I3nODQbEHO1/VeGjQSo/r0pcdtLKG36TBp2xvBaIfh4O2NXvPJ7QCQ0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=aCZlGLDt; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1737179587; a=rsa-sha256; cv=none; b=YBe+DZMgRSnNeZHm5CVfpe6hs+TuGue2/ibDULulfgnsc1XR8biFBQKP+b2HCQajCN5ngX 3scUU2CZHcXawF4d/I6O4Ez2f1ZNC+a9DoGofkA6YoJpMYd5aFC8brTWldbLmhMpTmMGdA 2ac7cKYeyhZ/wqJlEx1tV2fJM0MqRLI4j0+GEtJS5LTrxV+jBSSXkH2+AFnADOBIsyXcOq 65zf2WW/zuvyesXO7GvQKBls/SSeoogKgkrWz5GiIfumegwXDlY+xifqsL6RHWcahmBrUG EKjrf7fFTknUPCgfYrm73fMo7X0vzeN5eSHZm+iygb8Oek5x9jVOXcj2SCYFwA== 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 9E147782C7 for ; Sat, 18 Jan 2025 06:53:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tZ1kn-0003wH-LH; Sat, 18 Jan 2025 00:52:17 -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 1tYwtC-0002V5-Ix for emacs-orgmode@gnu.org; Fri, 17 Jan 2025 19:40:38 -0500 Received: from mail-vk1-xa33.google.com ([2607:f8b0:4864:20::a33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYwtA-0003IC-Op for emacs-orgmode@gnu.org; Fri, 17 Jan 2025 19:40:38 -0500 Received: by mail-vk1-xa33.google.com with SMTP id 71dfb90a1353d-51cd05384aaso831471e0c.0 for ; Fri, 17 Jan 2025 16:40:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737160835; x=1737765635; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=/pbsMQ654HEI8ySI02pjS8WR5sJgb29zZhs3d/+5jLM=; b=aCZlGLDto5WtSXEP80uNtxnv7dUfzWA2WLVuE/tLHEVG28pTJJlD/qdhOFpSg5Z4W2 aurLFte4eQrSFLcsnzJsUoT8HzoGFH+y/GPcoOM1onOT2a1DRvLA2rnj8RvWeY3JGVeI yX8Zm4+qPjOYFJx++ea8GI2Rx1nmoFPBe7k+dEy5ggzUxKwG1ky40Lr1QRWaoVybczry ZMzwWhJoxQB/QnUm8ibx1gOjRDSQj0Sg/1i+EVZJGRv9DX2OABThxswlyWo2aGmgsWlh ePdY82wBC5TWr8ykNnA0OWkGk+1+cNZ18mW1enho1Ra62WCwaaT33h2ryvnjPFe+o9Km 8cOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737160835; x=1737765635; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/pbsMQ654HEI8ySI02pjS8WR5sJgb29zZhs3d/+5jLM=; b=gxa4SBHHsFFVjM3Zfw/CxIOTId78E23dpudbY3TJQpnBTjOTK0+Q6wYmKiKMLpBOLR 7TEzssdi2axo38OWoLtbPhYzf+pUp3sZGUId6dCuG4Tm91nsmdVVYLdITn95qf6i0fIO 4HdXo+4V+PrNDq8tpi2ggwVi1df6wzXUATzskOuQkGKuZD80VL4o7p4q/redd2BCg1Qx HFrG/fOAzO7srrlFRBFqBhM/fQH/YTiTUbf89PgKn9/suqnsUUZ9YB25a8RLzzSDN+lZ n+6mdC/D2XCYNNDGDV+OAY0h1hPKEEB/oumLC0K+A7pGpgxbDqSqfmoyXxbrAlWRhYjP Hnvw== X-Gm-Message-State: AOJu0YzTLLtZwK3SHSysymEka29y19RqHhyuU3kTORw1xVGEiAQB3B2f gEJ60RAcIQyk0AbWlmNrZ0W03jz0p0qNmClyu0TOutCOT1nV2gyr7RKxr8smFwP0z82h4sAK74r uk+Lrolgk8OxV0/qh5Xo9cKVX/jY23kTQ X-Gm-Gg: ASbGncvrSfEp3BNrTiPsvrlLNNHzHQm/CZM+tUd5g7Q3C46TLcqLWr3ub67JCwrgccB QYd3IVxegdYOOEg8ihuZFbuhWukU6DxzjLaS13w== X-Google-Smtp-Source: AGHT+IHSteFmDf1Md0X6buGq5bqCxWMQkm9WlL+Uw809fh6MKJTlFUE/MqmBQ9cQR6G8zdkF3JFywiqVdAUpJST7k4k= X-Received: by 2002:a05:6122:1820:b0:518:9582:db90 with SMTP id 71dfb90a1353d-51d5b376e65mr4371325e0c.11.1737160835222; Fri, 17 Jan 2025 16:40:35 -0800 (PST) MIME-Version: 1.0 From: Ship Mints Date: Fri, 17 Jan 2025 19:39:01 -0500 X-Gm-Features: AbW1kvZyYn_3Fj8hGNND-qkdvuB_6vWPLRQr446wguVXr-aoA4rbALUOoZS69QQ Message-ID: Subject: Add org-src-is-fontify-buffer-p (patch attached) To: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="000000000000806567062bf046df" Received-SPF: pass client-ip=2607:f8b0:4864:20::a33; envelope-from=shipmints@gmail.com; helo=mail-vk1-xa33.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 18 Jan 2025 00:52:15 -0500 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: 9E147782C7 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 0.47 X-Spam-Score: 0.47 X-TUID: odEmY3ftUh4x --000000000000806567062bf046df Content-Type: multipart/alternative; boundary="000000000000806563062bf046dd" --000000000000806563062bf046dd Content-Type: text/plain; charset="UTF-8" Greetings, org-mode maintainers, I've become an occasional contributor over on the Emacs side. I thought I'd give an org-mode contribution a try. The attached patch came out of the discussion here https://www.reddit.com/r/emacs/comments/1i3mk6m/disable_eglot_in_orgmode_source_blocks/ 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))) I made a similar patch, submitted via a github pull request, to the markdown-mode maintainers for the same functionality in their fontification buffers. The patch was tested against today's main. I hope you find this useful. Let me know your feedback. Thanks for org-mode, -Stephane Marks P.S. I am on record with the FSF. --000000000000806563062bf046dd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Greetings, org-mode maintainers,

I've become an occasional contributor over on th= e Emacs side. I thought I'd give an org-mode contribution a try.
<= div class=3D"gmail_default" style=3D"font-family:monospace">

<= /div>
I've = added the predicate function org-src-is-fontify-buffer-p which=C2=A0can 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-hoo= k ()
=C2= =A0 (unless (and (featurep 'org) (org-src-is-fontify-buffer-p))
=C2= =A0 =C2=A0 (eglot-ensure)))

I made a similar patch, submitted via a github pull requ= est, to the markdown-mode maintainers for the same functionality in their f= ontification buffers.

The patch was tested against today's main. I hope you find thi= s useful. Let me know your feedback.

Thanks for org-mode,

-Stephane Marks

P.S. I am on record with the FSF.
<= /div> --000000000000806563062bf046dd-- --000000000000806567062bf046df Content-Type: application/octet-stream; name="0001-Add-predicate-function-org-src-is-fontify-buffer-p.patch" Content-Disposition: attachment; filename="0001-Add-predicate-function-org-src-is-fontify-buffer-p.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m61gm6ua0 RnJvbSA3NDVmOWI2NzIwZDA5OWM3MTRjZTkyZjhmODJmNDNmNjY3MTFkZjRhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBzaGlwbWludHMgPHNoaXBtaW50c0BnbWFpbC5jb20+CkRhdGU6 IEZyaSwgMTcgSmFuIDIwMjUgMTk6MzI6MTcgLTA1MDAKU3ViamVjdDogW1BBVENIXSBBZGQgcHJl ZGljYXRlIGZ1bmN0aW9uIG9yZy1zcmMtaXMtZm9udGlmeS1idWZmZXItcAoKVGhpcyBjYW4gYmUg dXNlZCBpbiBhIHByb2ctbW9kZSBob29rIHRvIGF2b2lkIHJlc291cmNlLWludGVuc2l2ZQpmZWF0 dXJlcyBzdWNoIGFzIGVnbG90IGluc2lkZSBhIGZvbnRpZmljYXRpb24gYnVmZmVyLiBBIHNob3J0 IGV4YW1wbGUKY2FuIGJlIGZvdW5kIGluIHRoZSBmdW5jdGlvbidzIGRvY3N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IChlZ2xvdC1l bnN1cmUpKSIKKyAgKGJ1ZmZlci1sb2NhbC12YWx1ZSAnb3JnLXNyYy0taXMtZm9udGlmeS1idWZm ZXIKKyAgICAgICAgICAgICAgICAgICAgICAob3IgYnVmZmVyIChjdXJyZW50LWJ1ZmZlcikpKSkK KwogKGRlZnZhciBvcmctc3JjLWZvbnRpZnktbmF0aXZlbHkpIDsgRGVmaW5lZCBpbiBvcmcuZWwK IChkZWZ1biBvcmctc3JjLWZvbnQtbG9jay1mb250aWZ5LWJsb2NrIChsYW5nIHN0YXJ0IGVuZCkK ICAgIkZvbnRpZnkgY29kZSBibG9jayBiZXR3ZWVuIFNUQVJUIGFuZCBFTkQgdXNpbmcgTEFORydz IHN5bnRheC4KQEAgLTY3OCw2ICs2OTcsNyBAQCBhcyBgb3JnLXNyYy1mb250aWZ5LW5hdGl2ZWx5 JyBpcyBub24tbmlsLiIKIAkgICAgICAoZXJhc2UtYnVmZmVyKQogCSAgICAgIDs7IEFkZCBzdHJp bmcgYW5kIGEgZmluYWwgc3BhY2UgdG8gZW5zdXJlIHByb3BlcnR5IGNoYW5nZS4KIAkgICAgICAo aW5zZXJ0IHN0cmluZyAiICIpKQorICAgICAgICAgICAgKHNldHEgb3JnLXNyYy0taXMtZm9udGlm eS1idWZmZXIgdCkgOyBsZXQgdGhlIG1vZGUga25vdyB0aGlzIGlzIGEgZm9udGlmeSBidWZmZXIK IAkgICAgKHVubGVzcyAoZXEgbWFqb3ItbW9kZSBsYW5nLW1vZGUpIChmdW5jYWxsIGxhbmctbW9k ZSkpCiAgICAgICAgICAgICAoc2V0cSBuYXRpdmUtdGFiLXdpZHRoIHRhYi13aWR0aCkKICAgICAg ICAgICAgIChmb250LWxvY2stZW5zdXJlKQotLSAKMi40Ny4xCgo= --000000000000806567062bf046df--