emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kai Harries <kai.harries@posteo.de>
To: emacs-orgmode@gnu.org
Subject: Is org-block really the intended face for captions?
Date: Sat, 29 Jan 2022 06:59:16 +0000	[thread overview]
Message-ID: <87mtjff2nv.fsf@x230.kaiha.invalid> (raw)

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

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


[-- 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
 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	other threads:[~2022-01-29  7:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtjff2nv.fsf@x230.kaiha.invalid \
    --to=kai.harries@posteo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).