emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Is org-block really the intended face for captions?
@ 2022-01-29  6:59 Kai Harries
  0 siblings, 0 replies; only message in thread
From: Kai Harries @ 2022-01-29  6:59 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]


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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-fontify-meta-lines-and-blocks-use-org-default-fa.patch --]
[-- Type: text/x-patch, Size: 1141 bytes --]

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

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))
 	 ((member dc3 '(" " ""))
 	  ;; Just a comment, the plus was not there

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-29  7:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-29  6:59 Is org-block really the intended face for captions? Kai Harries

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).