emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is org-block really the intended face for captions?


From: Kai Harries
Subject: Is org-block really the intended face for captions?
Date: Sat, 29 Jan 2022 06:59:16 +0000

Hello,

this is my first post to this mailing list.  Great thanks to all of you
that have made org-mode such a wonderful tool.

I usually have lots of code-blocks in my org-mode documents.  I recently
decided to give them another background color (by modifying the face
"org-block") to distinguish them better from the rest of the document.
That was when I noticed that the same face (org-block) was used also for
captions.  Is this really intended?  Attached is my naive attempt to
change this by applying the org-default face to the captions.  So my
question, could we change the face for captions?  Which face should be
used, org-default or should a new face be introduced?

Best regards

Kai

>From ac81515cc85edf36c2ea32028e557362a4bc6d3a Mon Sep 17 00:00:00 2001
From: Kai Harries <kai.harries@posteo.de>
Date: Sat, 29 Jan 2022 07:33:21 +0100
Subject: [PATCH] org-fontify-meta-lines-and-blocks: use org-default face for
 caption

Previous the face org-block was used for captions.  That looks quite
awkward if you decide to change the background color of org-block to
make code-blocks, etc. stand out.  TBH I don't really understand the
reasoning behind choosing org-block as face for captions but IMHO
org-default seems to me a saner choice.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index d58f6af55..8eaf5b0de 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5387,7 +5387,7 @@ by a #."
          (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-default))
          t)
         ((member dc3 '(" " ""))
          ;; Just a comment, the plus was not there
-- 
2.33.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]