From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WDF5B1mz7WVZEQAAqHPOHw:P1 (envelope-from ) for ; Sun, 10 Mar 2024 14:19:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id WDF5B1mz7WVZEQAAqHPOHw (envelope-from ) for ; Sun, 10 Mar 2024 14:19:21 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=cassou.me header.s=dkim header.b=crWMOkdw; 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=cassou.me ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710076761; 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=ZT/QJGOk9YEJm9dooJtDkDr8RgxE9iyark2YylhHMiA=; b=YHdvp6cXUT3PpsfzKg11fgnZrSp2zS8V64MjSZASUdJ4uCCAV31tF6ShSRnbofOqWlO2zl wDkA5SWt1IqlZOgINWFfvTTF+jPUvmX8cnxUCef92x9FyNpz1h4nfCSZ7v64dFsz3thBJE 4mSVqsCQosmSr/GBIsu917k4/h4+6rvAmZkXk4oMaU4yjqk2i0ELGL0EKh95FnLFauxegK Z+xA9DoSns+/yOkjBFaT9EbqLMvVzBu+zqCAVa6NQaevdGnNXqAYpCzp7BPsoIxEJuWNVm ZG3vGQ2hdi7jdQ4nezq7rUFqIdzZ3Yyj26HL/y9oppr+RSCWHu4eqOV9wXfvAQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=cassou.me header.s=dkim header.b=crWMOkdw; 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=cassou.me ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710076761; a=rsa-sha256; cv=none; b=tZy09egqpcVcY99ow6UJC2Ec3CjHEwFJtrVie1FrAkqcYALyvJ8Nn6jeSUmpuwda0TLldg 4csTkrhI2HKudE08UGu26a+GSMFVuz0WkEiCWfQRlOnDEL+stIyRBzlDa44BIFPC+SGvWT j2whEqnIaBni5Y7VuPqcfdj/jzomyKK7PLWz3OJ4OrAUPiawToKW+tzhKIj65CABIioGRY 91XS+4fn7KQEsK7MHnkWjXPF3E5mz08WuaQmDwPmwxZFD7VRv6gk9l9UXfhRzhkFytomvQ Oz46K9op5CLP2Aa4hym8YFZqR2wfEV0p6iAHqn6HZuyShD7Cf1CiN2/OUsZYgQ== 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 BF98A22617 for ; Sun, 10 Mar 2024 14:19:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjJ4L-0005gi-GT; Sun, 10 Mar 2024 09:18:25 -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 1rjJ4J-0005gJ-Jg for emacs-orgmode@gnu.org; Sun, 10 Mar 2024 09:18:23 -0400 Received: from mail.reprendre.net ([2001:910:1410:501::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjJ4H-00035Y-C4 for emacs-orgmode@gnu.org; Sun, 10 Mar 2024 09:18:23 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4DC372C8DAA for ; Sun, 10 Mar 2024 14:18:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cassou.me; s=dkim; t=1710076692; h=from:subject:date:message-id:to:mime-version:content-type; bh=ZT/QJGOk9YEJm9dooJtDkDr8RgxE9iyark2YylhHMiA=; b=crWMOkdwCzfTMGpKT5AYlkqazQ0EVe3nOrHH0T3XK9VvKlQioikdNVqzT5YNn+GpIsIz74 2dOAb0ftHYBb8NQTKnAnd8qXtYvLCJQBIhsXcZutkbVytLs+NfXV/14UOS1v9G+NV03VmL 06eDjScZIxC9UR01k7u+8NWapAVMVOtEUGns4/INY0si2BbDOu3NucLJQ+MZLBptKXLEBm mgHAwV7MDsCAGERdBRHvZeuvG5VOXIzttbl7C3ol9jf+I5wNQ3SEMiiivtfAPZ+h+IuQcY JYW3jKqtIkHi/6ujk7sQtFqYTlrjtudfXUAa11OQMDmrEVwYv5uwopRT/VdiCg== From: Damien Cassou To: emacs-orgmode@gnu.org Subject: [BUG] [PATCH] Use new face org-caption for #+caption lines [9.6.21 ( @ /home/cassou/.emacs.d/lib/org/lisp/)] Date: Sun, 10 Mar 2024 14:18:10 +0100 Message-ID: <87le6q5ip9.fsf@cassou.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Last-TLS-Session-Version: TLSv1.3 Received-SPF: pass client-ip=2001:910:1410:501::1; envelope-from=damien@cassou.me; helo=mail.reprendre.net 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, SPF_HELO_PASS=-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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.48 X-Spam-Score: -7.48 X-Migadu-Queue-Id: BF98A22617 X-TUID: somGVW7YvU81 --=-=-= Content-Type: text/plain Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. ------------------------------------------------------------------------ Currently, the caption of a picture (here the text "Description of the piture") has the face `org-block': #+CAPTION: Description of the picture. #+RESULTS: [[file:./picture.png]] I don't see any reason for the caption to use the same face as code inside blocks as captions are expected to be human-readable text. Attached patch introduces a new `org-caption' face applied on captions. For conservative reasons, the new face inherits from `org-block' but I can change that if you want. Best Emacs : GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) Package: Org mode version 9.6.21 ( @ /home/cassou/.emacs.d/lib/org/lisp/) -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Use-new-face-org-caption-for-caption-lines.patch >From 9535fa8c078ca5ecb583ec4862f84028de018ae9 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Sun, 10 Mar 2024 14:11:43 +0100 Subject: [PATCH] Use new face org-caption for #+caption lines * lisp/org-faces.el: Add face `org-caption'. * lisp/org.el (org-fontify-meta-lines-and-blocks-1): Use `org-caption' instead of `org-block' as face for #+caption content. --- 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 0e20de51a..633d539db 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -454,6 +454,11 @@ (defface org-block `((t :inherit shadow :group 'org-faces :version "26.1") +(defface org-caption '((t (:inherit org-block))) + "Face used for #+caption content." + :group 'org-faces + :version "30.1") + (defface org-block-begin-line '((t (:inherit org-meta-line))) "Face used for the line delimiting the begin of source blocks." :group 'org-faces) diff --git a/lisp/org.el b/lisp/org.el index d7d6a98b1..e3e12095c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5592,7 +5592,7 @@ (defun org-fontify-meta-lines-and-blocks-1 (limit) (add-text-properties (line-beginning-position) (match-end 1) '(font-lock-fontified t face org-meta-line)) (add-text-properties (match-end 0) (line-end-position) - '(font-lock-fontified t face org-block)) + '(font-lock-fontified t face org-caption)) t) ((member dc3 '(" " "")) ;; Just a comment, the plus was not there -- 2.43.2 --=-=-=--