branch: externals/modus-themes commit 4ef638c53b1eb35e8861da6bae47dca4584d2941 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Rewrite docs about Org custom faces Thanks to soaringbird for reporting the issue with the incorrect use of a quoted list. This was done on the mailing list: <https://lists.sr.ht/~protesilaos/modus-themes/%3CNXPVkVk--3-9%40tuta.io%3E>. --- doc/modus-themes.info | 135 ++++++++++++++++++++++++++------------------------ doc/modus-themes.org | 39 ++++++++------- 2 files changed, 90 insertions(+), 84 deletions(-) diff --git a/doc/modus-themes.info b/doc/modus-themes.info index 9ed890c6ae..f8a9bd2440 100644 --- a/doc/modus-themes.info +++ b/doc/modus-themes.info @@ -3274,18 +3274,18 @@ have something like this: (sequence "WRITE(w)" "|" "WROTE(W)"))) You could then use a variant of the following to inherit from a face -that uses the styles you want and also to preserve the properties +that uses the styles you want and also to preserve the attributes applied by the ‘org-todo’ face (in case there is a difference between the two): (setq org-todo-keyword-faces - '(("MEET" . '(bold org-todo)) - ("STUDY" . '(warning org-todo)) - ("WRITE" . '(shadow org-todo)))) + '(("MEET" . (:inherit (bold org-todo))) + ("STUDY" . (:inherit (warning org-todo))) + ("WRITE" . (:inherit (shadow org-todo))))) This will refashion the keywords you specify, while letting the other -items in ‘org-todo-keywords’ use their original styles (which are -defined in the ‘org-todo’ and ‘org-done’ faces). +items in ‘org-todo-keywords’ use their original styles, which are +defined in the ‘org-todo’ and ‘org-done’ faces. If you want back the defaults, try specifying just the ‘org-todo’ face: @@ -3295,23 +3295,26 @@ face: ("STUDY" . org-todo) ("WRITE" . org-todo))) - When you inherit from multiple faces, you need to quote the list as + Or set ‘org-todo-keyword-faces’ to ‘nil’. + + When you inherit from multiple faces, you need to do it the way it is shown further above. The order is significant: the first entry is -applied on top of the second, overriding any properties that are -explicitly set for both of them: any property that is not specified is +applied on top of the second, overriding any attributes that are +explicitly set for both of them: any attribute that is not specified is not overridden, so, for example, if ‘org-todo’ has a background and a foreground, while ‘font-lock-type-face’ only has a foreground, the merged face will include the background of the former and the foreground -of the latter. If you do not want to blend multiple faces, you do not -need a quoted list. A pattern of ‘keyword . face’ will suffice. +of the latter. If you do not want to blend multiple faces, you only +specify one by name without parentheses or an ‘:inherit’ keyword. A +pattern of ‘keyword . face’ will suffice. Both approaches can be used simultaneously, as illustrated in this configuration of the priority cookies: (setq org-priority-faces - '((?A . '(bold org-priority)) + '((?A . (:inherit (bold org-priority))) (?B . org-priority) - (?C . '(shadow org-priority)))) + (?C . (:inherit (shadow org-priority))))) To find all the faces that are loaded in your current Emacs session, use ‘M-x list-faces-display’. Try ‘M-x describe-variable’ as well and @@ -6205,59 +6208,59 @@ Node: Font configurations for Org and others128414 Ref: Font configurations for Org and others-Footnote-1131323 Node: Configure bold and italic faces131510 Node: Custom Org todo keyword and priority faces135667 -Node: Custom Org emphasis faces139232 -Node: Update Org block delimiter fontification144055 -Node: Measure color contrast145972 -Node: Load theme depending on time of day148670 -Node: Backdrop for pdf-tools149680 -Node: Toggle themes without reloading them152579 -Node: A theme-agnostic hook for theme loading153855 -Node: Use more spacious margins or padding in Emacs frames156308 -Node: Custom hl-todo colors160194 -Node: Add support for solaire-mode161732 -Node: Face coverage164643 -Node: Supported packages165095 -Node: Indirectly covered packages170625 -Node: Notes on individual packages171978 -Node: Note on calendarel weekday and weekend colors173078 -Node: Note on git-gutter in Doom Emacs174226 -Node: Note on php-mode multiline comments176567 -Node: Note on underlines in compilation buffers177320 -Node: Note on inline Latex in Org buffers178157 -Node: Note on dimmerel178767 -Node: Note on display-fill-column-indicator-mode180252 -Node: Note on highlight-parenthesesel181651 -Node: Note on mmm-modeel background colors187629 -Node: Note for prism189929 -Node: Note on company-mode overlay pop-up193097 -Ref: Note on company-mode overlay pop-up-Footnote-1193827 -Ref: Note on company-mode overlay pop-up-Footnote-2193894 -Node: Note on ERC escaped color sequences193949 -Ref: Note on ERC escaped color sequences-Footnote-1195377 -Node: Note on powerline or spaceline195487 -Node: Note on SHR colors195901 -Node: Note on SHR fonts196325 -Node: Note on Ement colors and fonts196970 -Node: Note on pdf-tools link hints198480 -Node: Note on the Notmuch logo200940 -Node: Note on goto-address-mode faces201478 -Node: Frequently Asked Questions202596 -Node: Is the contrast ratio about adjacent colors?203227 -Node: What does it mean to avoid exaggerations?204734 -Node: Why are colors mostly variants of blue magenta cyan?206584 -Node: What is the best setup for legibility?210890 -Node: Are these color schemes?213535 -Node: Port the Modus themes to other platforms?217217 -Node: Contributing220061 -Node: Sources of the themes220458 -Node: Issues you can help with221352 -Node: Patches require copyright assignment to the FSF222743 -Node: Acknowledgements224963 -Node: GNU Free Documentation License229040 -Node: Indices254404 -Node: Function index254583 -Node: Variable index255766 -Node: Concept index258222 +Node: Custom Org emphasis faces139386 +Node: Update Org block delimiter fontification144209 +Node: Measure color contrast146126 +Node: Load theme depending on time of day148824 +Node: Backdrop for pdf-tools149834 +Node: Toggle themes without reloading them152733 +Node: A theme-agnostic hook for theme loading154009 +Node: Use more spacious margins or padding in Emacs frames156462 +Node: Custom hl-todo colors160348 +Node: Add support for solaire-mode161886 +Node: Face coverage164797 +Node: Supported packages165249 +Node: Indirectly covered packages170779 +Node: Notes on individual packages172132 +Node: Note on calendarel weekday and weekend colors173232 +Node: Note on git-gutter in Doom Emacs174380 +Node: Note on php-mode multiline comments176721 +Node: Note on underlines in compilation buffers177474 +Node: Note on inline Latex in Org buffers178311 +Node: Note on dimmerel178921 +Node: Note on display-fill-column-indicator-mode180406 +Node: Note on highlight-parenthesesel181805 +Node: Note on mmm-modeel background colors187783 +Node: Note for prism190083 +Node: Note on company-mode overlay pop-up193251 +Ref: Note on company-mode overlay pop-up-Footnote-1193981 +Ref: Note on company-mode overlay pop-up-Footnote-2194048 +Node: Note on ERC escaped color sequences194103 +Ref: Note on ERC escaped color sequences-Footnote-1195531 +Node: Note on powerline or spaceline195641 +Node: Note on SHR colors196055 +Node: Note on SHR fonts196479 +Node: Note on Ement colors and fonts197124 +Node: Note on pdf-tools link hints198634 +Node: Note on the Notmuch logo201094 +Node: Note on goto-address-mode faces201632 +Node: Frequently Asked Questions202750 +Node: Is the contrast ratio about adjacent colors?203381 +Node: What does it mean to avoid exaggerations?204888 +Node: Why are colors mostly variants of blue magenta cyan?206738 +Node: What is the best setup for legibility?211044 +Node: Are these color schemes?213689 +Node: Port the Modus themes to other platforms?217371 +Node: Contributing220215 +Node: Sources of the themes220612 +Node: Issues you can help with221506 +Node: Patches require copyright assignment to the FSF222897 +Node: Acknowledgements225117 +Node: GNU Free Documentation License229194 +Node: Indices254558 +Node: Function index254737 +Node: Variable index255920 +Node: Concept index258376 End Tag Table diff --git a/doc/modus-themes.org b/doc/modus-themes.org index c649906789..dd5a0bf4ee 100644 --- a/doc/modus-themes.org +++ b/doc/modus-themes.org @@ -3150,20 +3150,20 @@ have something like this: #+end_src You could then use a variant of the following to inherit from a face -that uses the styles you want and also to preserve the properties -applied by the ~org-todo~ face (in case there is a difference between the -two): +that uses the styles you want and also to preserve the attributes +applied by the ~org-todo~ face (in case there is a difference between +the two): #+begin_src emacs-lisp (setq org-todo-keyword-faces - '(("MEET" . '(bold org-todo)) - ("STUDY" . '(warning org-todo)) - ("WRITE" . '(shadow org-todo)))) + '(("MEET" . (:inherit (bold org-todo))) + ("STUDY" . (:inherit (warning org-todo))) + ("WRITE" . (:inherit (shadow org-todo))))) #+end_src This will refashion the keywords you specify, while letting the other -items in ~org-todo-keywords~ use their original styles (which are defined -in the ~org-todo~ and ~org-done~ faces). +items in ~org-todo-keywords~ use their original styles, which are +defined in the ~org-todo~ and ~org-done~ faces. If you want back the defaults, try specifying just the ~org-todo~ face: @@ -3174,24 +3174,27 @@ If you want back the defaults, try specifying just the ~org-todo~ face: ("WRITE" . org-todo))) #+end_src -When you inherit from multiple faces, you need to quote the list as +Or set ~org-todo-keyword-faces~ to ~nil~. + +When you inherit from multiple faces, you need to do it the way it is shown further above. The order is significant: the first entry is -applied on top of the second, overriding any properties that are -explicitly set for both of them: any property that is not specified is -not overridden, so, for example, if ~org-todo~ has a background and a -foreground, while ~font-lock-type-face~ only has a foreground, the merged -face will include the background of the former and the foreground of the -latter. If you do not want to blend multiple faces, you do not need a -quoted list. A pattern of =keyword . face= will suffice. +applied on top of the second, overriding any attributes that are +explicitly set for both of them: any attribute that is not specified +is not overridden, so, for example, if ~org-todo~ has a background and +a foreground, while ~font-lock-type-face~ only has a foreground, the +merged face will include the background of the former and the +foreground of the latter. If you do not want to blend multiple faces, +you only specify one by name without parentheses or an =:inherit= +keyword. A pattern of =keyword . face= will suffice. Both approaches can be used simultaneously, as illustrated in this configuration of the priority cookies: #+begin_src emacs-lisp (setq org-priority-faces - '((?A . '(bold org-priority)) + '((?A . (:inherit (bold org-priority))) (?B . org-priority) - (?C . '(shadow org-priority)))) + (?C . (:inherit (shadow org-priority))))) #+end_src To find all the faces that are loaded in your current Emacs session, use