emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/modus-vivendi-theme d931e3c 022/110: Add docs on ORG co


From: Stefan Monnier
Subject: [elpa] externals/modus-vivendi-theme d931e3c 022/110: Add docs on ORG colour-coded source blocks
Date: Wed, 29 Apr 2020 21:39:58 -0400 (EDT)

branch: externals/modus-vivendi-theme
commit d931e3cf3eaf941b4ea663926e00bd60c9a244de
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>

    Add docs on ORG colour-coded source blocks
    
    This is about `C-h v org-src-block-faces' and was reported in issue 34:
    https://gitlab.com/protesilaos/modus-themes/-/issues/34
    
    The feature cannot be supported at the theme level.  However, we can
    provide a set of "tested and approved" colour values for use as
    backgrounds to such blocks.
---
 README.org | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/README.org b/README.org
index 89407b8..bd32b7a 100644
--- a/README.org
+++ b/README.org
@@ -455,6 +455,67 @@ effect/: less intense colours (but still accessible) for 
supportive
 interfaces and the intended styles for the content you are actually
 working on.
 
+** Note about colour-coded ORG source blocks
+   :PROPERTIES:
+   :CUSTOM_ID: h:9ef7e899-63f4-4eb1-958c-1a1dd999fa35
+   :END:
+
+It is possible to apply unique coloured backgrounds to Org's source
+blocks on a per-language basis.  The customisation option is
+=org-src-block-faces=.
+
+Because this is an inherently subjective choice, it is impossible to
+reach a consensus of what colour should be assigned to each language.
+Furthermore, there are so many languages to choose from, making it
+impractical to apply a unique background to each of them without adding
+disproportionate complexity to the themes.
+
+The least we could do is provide a set of background values that have
+been tested with all colours that highlight code syntax.
+
+These approved colour variants are as follows:
+
+| Background | Modus Operandi | Modus Vivendi |
+|------------+----------------+---------------|
+| red        | #fef2f2        | #180505       |
+| yellow     | #fcf6f1        | #18140a       |
+| magenta    | #fff4fc        | #160616       |
+| green      | #f4faf4        | #061206       |
+| blue       | #f4f4ff        | #070722       |
+| cyan       | #f0f6fa        | #091620       |
+
+The differences between those colour values are subtle, but quite
+noticeable when applied to large, contiguous areas (such as code
+blocks).
+
+Pick the one you wish to use for your language of choice.  Here is an
+example:
+
+#+begin_src emacs-lisp
+;; Modus Operandi
+(setq org-src-block-faces '(("emacs-lisp" (:background "#fef2f2"))
+                            ("python" (:background "#f4f4ff"))))
+
+;; Modus Vivendi
+(setq org-src-block-faces '(("emacs-lisp" (:background "#180505"))
+                            ("python" (:background "#070722"))))
+#+end_src
+
+For versions of Emacs >= 27, also add the =:extend t= property, like this:
+
+#+begin_src emacs-lisp
+;; Modus Operandi
+(setq org-src-block-faces '(("emacs-lisp" (:background "#fef2f2" :extend t))
+                            ("python" (:background "#f4f4ff" :extend t))))
+
+;; Modus Vivendi
+(setq org-src-block-faces '(("emacs-lisp" (:background "#180505" :extend t))
+                            ("python" (:background "#070722" :extend t))))
+#+end_src
+
+Feel free to contribute any concrete proposals on how to improve support
+for this at the theme level (see 
[[#h:25ba8d6f-6604-4338-b774-bbe531d467f6][the "Contributing" section]].
+
 ** Note for HELM users of grep or grep-like functions
    :PROPERTIES:
    :CUSTOM_ID: h:e4408911-e186-4825-bd4f-4d0ea55cd6d6



reply via email to

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