From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YCRVIe93BWVCWAAA9RJhRA:P1 (envelope-from ) for ; Sat, 16 Sep 2023 11:39:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YCRVIe93BWVCWAAA9RJhRA (envelope-from ) for ; Sat, 16 Sep 2023 11:39:59 +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 2F99A5DCA8 for ; Sat, 16 Sep 2023 11:39:59 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protesilaos.com header.s=gm1 header.b=gXx64Mbz; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694857199; 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=m8lH0LTMzX+r9xExrI3ZW5IsEJhDzT6DJ3porOGFD2k=; b=Z1AhyZ8ed0glCfFwSpnkIO+Os7B/UymykjUefPXFdbWWCYrSVr2jcgojc96uQLCOw6tQn2 OABwROo+c4s6+eAh+fRUv6pYi4CMxE0vAA6e4GzFgi740/McXW4qETZpQqh/3tYFFya7jj GyDGAhLzr4+bNCpdNOlrGGDsimwDIgia0kOFAotwBNeX4KyZ1sA1+Bs548o4vEKPr40ecK dwWZyxqqWUaxvqHczInIqQX9/BKupTtZO3lijbvTKvHKsiJL6E3nSbwlu4ORZvkHGDjzpH RZQkKgetaPgbDg238xtCw6PaJvxpIWq4DYcfU6E4uUh/5WZqiMM42RTpP0z27Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protesilaos.com header.s=gm1 header.b=gXx64Mbz; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694857199; a=rsa-sha256; cv=none; b=WqP1xsRHNfCTklc7aghl8vT89CUt6PxPRIi6wpW5+MBJ7CVnhHWcwnfzvFhBvDMfXcsenA FW/Ddh0J/q9Yb23YkpfrtOrMns8uj7dGOaRuLC3IgjLGliLqFq0fqrfUsWFZIqpWduvZQe KTR/siRMbdPaDS5CyGOue/fc2b1CojEVl6lA59zaxRTRz3AlFpoxYdlJPJuIM263qUx//j kEHBGxLI2Sain3L53LFRQKJgKTE/Lt/aYSKezfDN8rU4ARvHossMyXCDmHF9uU4m22uUF3 0F5EK5pLLHiRBqh1rKuLxa68BOPmSZT13aqMY6ACDtiPdUTwe9WCuV0/S+5Hwg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhRlj-00079L-3a; Sat, 16 Sep 2023 05:39:15 -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 1qhRlf-00078t-Qu for emacs-orgmode@gnu.org; Sat, 16 Sep 2023 05:39:12 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhRlc-00088V-JN for emacs-orgmode@gnu.org; Sat, 16 Sep 2023 05:39:11 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id ED0C760002 for ; Sat, 16 Sep 2023 09:39:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1694857144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=m8lH0LTMzX+r9xExrI3ZW5IsEJhDzT6DJ3porOGFD2k=; b=gXx64MbzOMQkrewaQcAZiDZ6x3nlXJ5aRWpP7PGSe4DY1xSiqZQfqhcWPgLJrlrDgVVUDi lmKiWTCviSJT1ASBLn12kWg2I+bTG4KCbwsRZxB9jSea5Iut5DtYHh1EjhazCzVp7H73uC 2ZmpCM3OV+fbvDv+XswIc3QSc710W4kw4ejXN2qlIiRvJs8WuZ2q5pSbVuGXd6V8El8NYD 5pLoCkBPcGHzkytvYnOVYNq3EycP2+fb0FW4pH7/haxa/44VamcH4E3v/BieztUqiIBHVG BLb8k5EFK+v3sYElL0VadheTpzOeRsAUdFF5YxxKQBooZ2SABlZcXeiMInM+ew== From: Protesilaos Stavrou To: emacs-orgmode@gnu.org Subject: [PATCH] Define new face for the contents of #+RESULTS drawers Date: Sat, 16 Sep 2023 12:38:59 +0300 Message-ID: <878r96tq30.fsf@protesilaos.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-Sasl: info@protesilaos.com Received-SPF: none client-ip=217.70.183.195; envelope-from=info@protesilaos.com; helo=relay3-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -2.21 X-Spam-Score: -2.21 X-Migadu-Queue-Id: 2F99A5DCA8 X-TUID: tWnI+U62VMo9 --=-=-= Content-Type: text/plain Hello folks! I propose the attached patch. It gives users/themes the opportunity to style the contents of #+RESULTS drawers differently than the face applied to ~code~ elements. To preserve the current style, I made the new face inherit 'org-code'. What do you think? All the best, Protesilaos (or simply "Prot") -- Protesilaos Stavrou https://protesilaos.com --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Define-new-face-for-the-contents-of-RESULTS-drawers.patch >From 1ecd64bfe88d06684a9ad97c1ee6df0bdd2c1eb2 Mon Sep 17 00:00:00 2001 Message-ID: <1ecd64bfe88d06684a9ad97c1ee6df0bdd2c1eb2.1694856985.git.info@protesilaos.com> From: Protesilaos Stavrou Date: Sat, 16 Sep 2023 12:36:18 +0300 Subject: [PATCH] Define new face for the contents of #+RESULTS drawers * lisp/org-faces.el (org-code-results): Define new face. * lisp/org.el (org-set-font-lock-defaults): Use it instead of the generic 'org-code' face. --- lisp/org-faces.el | 5 +++++ lisp/org.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 436552cb2..3d233eaff 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -409,6 +409,11 @@ (defface org-code '((t :inherit shadow)) :group 'org-faces :version "22.1") +(defface org-code-results '((t :inherit org-code)) + "Face for the contents of #+RESULTS drawers." + :group 'org-faces + :version "30.1") + (defface org-meta-line '((t :inherit font-lock-comment-face)) "Face for meta lines starting with \"#+\"." :group 'org-faces diff --git a/lisp/org.el b/lisp/org.el index 84ac87438..6fb099618 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5905,7 +5905,7 @@ (defun org-set-font-lock-defaults () '(org-fontify-entities) '(org-raise-scripts) ;; Code - '(org-activate-code (1 'org-code t)) + '(org-activate-code (1 'org-code-results t)) ;; COMMENT (list (format "^\\*+\\(?: +%s\\)?\\(?: +\\[#[A-Z0-9]\\]\\)? +\\(?9:%s\\)\\(?: \\|$\\)" -- 2.42.0 --=-=-=--