From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 4D4gFhziLmT2QAEASxT56A (envelope-from ) for ; Thu, 06 Apr 2023 17:15:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qNj6FRziLmTSoQAAauVa8A (envelope-from ) for ; Thu, 06 Apr 2023 17:15:40 +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 EA28435987 for ; Thu, 6 Apr 2023 17:15:39 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkRK4-0002Yr-DT; Thu, 06 Apr 2023 11:14:48 -0400 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 1pkRK2-0002YA-6m for emacs-orgmode@gnu.org; Thu, 06 Apr 2023 11:14:46 -0400 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkRK0-00030r-Gf for emacs-orgmode@gnu.org; Thu, 06 Apr 2023 11:14:45 -0400 Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-5e73d89e52eso488636d6.1 for ; Thu, 06 Apr 2023 08:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680794082; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=qfN4paWrVGfMlNPacXfYF5G5peJ+NEDj8uBX16h3rqo=; b=QDAxeBiIoZYf+hWf45klISpKmIheovNFd7wSD/D4As5idjkshzSlvnvodLm39/LvJ2 wEvPDuMq2B/w9Fii8e91K72vQm8NIT2MqPnGcei5ybNrw+x/fGgSyvcmA2/zlLMGP9SM K85bigWnYij2YmYxRjcrm9np91jzrxUDBDfzAqXu/dpeSdXfAa7o8pr7dhztkDK6UJTN r8SxXM38e7GJqnRCi3Qzk/cHNdgJpfcXNdM+lvTEV2JQtk8lGLemxEY55DC3nkUABpzX vK1MNWLcLB9WemmS+ijsxoG2x/Ud++iDO8aZTUYqxzn4LPaiF7ITqQ3+iNjrbE/2wZ4O ++Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680794082; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qfN4paWrVGfMlNPacXfYF5G5peJ+NEDj8uBX16h3rqo=; b=NHfS6MoYO/DToFMbS3BNsNCnjlc+AP2PahiJvssIVCKPAJJJANpSzAc1k04CncsSjh Eb1iMXwnEhc5amVXZmqk92MPAptjdGT7D6sJVlUOmNPNasugvomvAc1W3iWP5CA3m8yz INyftZSCDIB1j09ZFYV0FaSMnqZIaOIRN/OQ1KGyqSy/58rkzcs43V7ZHlOPaB6KqvwG j8EkEKy1Jl4xSdfdJWutC8ruDFpjyrlXueNGrIYKoydNDZ37BXDj92i3GCBU6ZSklzP+ RmPyrer1Gv0uND9SA2GKuiWXhFWG9bYwRFPg6Lg8MALlOgwR4ioepBKbHDac03JvbGnP /Jtw== X-Gm-Message-State: AAQBX9dCzTDbZ0Ru8TaSAXDlHWmwIvePyZCxAf1TTsPpcVbFh+CZz5Sr p3rgKZy8ntW1T7dOSMtgZzfnzXEaZfk= X-Google-Smtp-Source: AKy350YppythGmU6M9a1jsYnOaSFmgvh87ICv98McF44zlb35VTrk+ui3LEzJJo+bXqQ5lPySqKigA== X-Received: by 2002:a05:6214:4008:b0:5da:b965:1efe with SMTP id kd8-20020a056214400800b005dab9651efemr10697209qvb.4.1680794082030; Thu, 06 Apr 2023 08:14:42 -0700 (PDT) Received: from entropy ([2601:241:8c80:25a0::71d8]) by smtp.gmail.com with ESMTPSA id ma12-20020a0562145b0c00b005dd8b9345f7sm556828qvb.143.2023.04.06.08.14.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Apr 2023 08:14:41 -0700 (PDT) User-agent: mu4e 1.8.13; emacs 30.0.50 From: Nathaniel Nicandro To: emacs-orgmode Subject: [PATCH] Handle block-type when checking `org-src-fontify-natively' Date: Thu, 06 Apr 2023 10:04:55 -0500 Message-ID: <87zg7lghzz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::f33; envelope-from=nathanielnicandro@gmail.com; helo=mail-qv1-xf33.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, 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-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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680794140; a=rsa-sha256; cv=none; b=paBS1T5yWOTIn0NVUnjw/oux2ybFL5/cs5r8H/cxNL642cUXJTsbqF83n8daUT2Gt6AjZt i2fRX2mCW0wbbBPAdse24IcFErW2YypwS6RIoANspWOvpxkOSk3dhdOYiIrtLiF1v4Ay2y QefXbnbK88efJDC4W5KsWMDjCme6axwdADOteRv+bm2fPFG3VO7m6oLuEZOryz8BldLrtk RAmr1iYu8vExsNmIqHFHf3Ntee/uByw5MvT1U0cdnucOCznOUXg56ZoXuhiq68qg/7s8Wk tdCFzNb9BxwzafgafpQAnWCm187MGsbsSe+73IAwP+j85H5Mh7zDFa0xR+BegA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QDAxeBiI; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680794140; 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=qfN4paWrVGfMlNPacXfYF5G5peJ+NEDj8uBX16h3rqo=; b=YEjSdcjThrGXwXkPxXITDARCsmB9Gaur3BkoD2A4oo5RUFp9J79wdQUkAu88udfMyG3K5i HDlkoV/qQCTlq1PH9Kqbq1SUiDiKO1ytugjXamDwNoSEHzzM5leOrR8KNhrzBjVk7PFBsR J2IvLywZ2Hbjzqu6WdPGR+4aRpn3yLlf06C5eKKcLOFM8+OTmB4WLeFk6whneP7dr+/kSi a0ACkidN8oMqQiJo1qjjwIkuePIsI+dIX6IC65LSlftwvtKWdo4Rv/rHzj6V0sfEc+yXtx z8vbvqjdMXjshOwXiqt+4rXKDJzKGD+RFqmpwZB8/tb3Bbavx4kLX23WPi//cw== X-Migadu-Spam-Score: -6.45 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QDAxeBiI; 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-Spam-Score: -6.45 X-Migadu-Queue-Id: EA28435987 X-TUID: 2Jayz121ff6L --=-=-= Content-Type: text/plain Hello, I think I found a bug where the condition for `org-src-fontify-natively` in `org-src-fontify-meta-lines-and-blocks-1` wasn't handling the block type. `org-src-fontify-natively` says it should fontify src blocks only, but the condition didn't have that constraint. Attached is a patch that adds in the constraint. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Handle-block-type-when-checking-org-src-fontify-nati.patch Content-Description: patch >From 2f1342ad5b13f75387f6a26f0c68aac054903bcc Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Thu, 6 Apr 2023 08:49:20 -0500 Subject: [PATCH] Handle block-type when checking `org-src-fontify-natively` * lisp/org.el (org-fontify-meta-lines-and-blocks-1): Only fontify natively for blocks of src type. --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a6b8a30..d6c5803 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5414,8 +5414,9 @@ (defun org-fontify-meta-lines-and-blocks-1 (limit) beg end-of-endline '(font-lock-fontified t font-lock-multiline t)) (org-remove-flyspell-overlays-in beg bol-after-beginline) (org-remove-flyspell-overlays-in nl-before-endline end-of-endline) - (cond - (org-src-fontify-natively + (cond + ((and org-src-fontify-natively + (string= block-type "src")) (save-match-data (org-src-font-lock-fontify-block (or lang "") block-start block-end)) (add-text-properties bol-after-beginline block-end '(src-block t))) -- 2.39.1 --=-=-= Content-Type: text/plain -- Nathaniel --=-=-=--