2

This seems like it's probably not possible, but I'm extremely new to Emacs and thought I'd ask.

I have a number of faces set in Org mode.

;; Highlight Line Colors
(add-hook 'org-mode-hook (lambda ()
(set-face-attribute 'org-level-1 nil                   :family "Mordens" :font "Mordens" :height 520 :foreground "#FDF0ED")
(set-face-attribute 'org-level-2 nil                   :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 220 :foreground "#25B2BC")
(set-face-attribute 'org-level-3 nil                   :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160)
(set-face-attribute 'org-level-4 nil                   :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :italic nil)
(set-face-attribute 'org-document-title nil            :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :italic 1 :foreground "#2E303E")
(set-face-attribute 'org-document-info nil             :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :italic 1 :foreground "#2E303E")
(set-face-attribute 'org-document-info-keyword nil     :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :italic 1 :foreground "#2E303E")
(set-face-attribute 'org-headline-done nil             :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :italic 1 :foreground "#6C6F93" :strike-through "#F43E5C" )
(set-face-attribute 'org-done nil                      :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :italic 1 :foreground "#6C6F93" :strike-through nil )
(set-face-attribute 'org-todo nil                      :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :italic 1 :foreground "#E95379")
(set-face-attribute 'org-checkbox-statistics-todo nil  :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :foreground "#09F7A0")
(set-face-attribute '+org-todo-project nil             :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 1.0 :foreground "#B877DB")
(set-face-attribute 'org-link nil                      :family "Iosevka Nerd Font" :font "Iosevka Nerd Font" :height 160 :italic 1 :underline "#FDF0ED" :foreground "#09F7A0")
(set-face-attribute 'line-number-current-line nil      :foreground "#09F7A0")))

What I would like to do is set +org-todo-project's height to the height of the header where it occurs.

Note: +org-todo-project sets the face for the keyword PROJ.

For example:

* PROJ This is a Project ;Header 1 Height 520
** PROJ This is another Project ; Header 2 Height 220

I've tried to search around, but again Emacs is a big placem so if it's possible I don't know what I am looking for. I thought trying a dolist to see if it would inherit the height but I'm pretty sure it would just inherit the last height before it, if at all.

2
2

The TODO keywords in a heading use both the org-todo and org-level- faces. Does it work as expected if you don't set the :height attribute of the org-todo face?

If you are looking to customize how the TODO keywords are displayed, you might want to check org-superstar-mode (in particular the documentation for org-superstar-todo-bullet-alist)

4
  • Sure does. Thanks! Is there a way to see what is inherited from something else?
    – Brandon
    Sep 3 '20 at 20:40
  • Also after I remove the customization and restart it's set again. Is there a way like in vim to see the last place a property/variable is set?
    – Brandon
    Sep 3 '20 at 20:48
  • try M-x describe-face with a selected region or the name of a face. you should see (customize this face) which you can click to get into an editing interface, any saved changes should appear in ~/.emacs.d/custom.el
    – zzkt
    Sep 3 '20 at 21:15
  • 1
    This is helpful. I'm using Doom Emacs and never thought of looking outside the .doom.d directory. Also just in case anyone else stumbles on this you can set any font property to `unspecified, which also resolved the issue.
    – Brandon
    Sep 3 '20 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.