bastibe / org-journal

A simple org-mode based journaling mode
BSD 3-Clause "New" or "Revised" License
1.24k stars 123 forks source link

Ability to set font colors for org-journal mode only (independent of org-mode) #384

Closed presto8 closed 2 years ago

presto8 commented 2 years ago

Currently, org-journal inherits the font attributes defined for org-mode. Because org-mode headlines (like level 2) are shown in a bright color usually (to differentiate them as headlines), this results in the majority of the org-journal buffer being displayed in a color not typically used for text (e.g., white or gray on a dark background).

The colors can be changed by setting the font-face for the org-mode levels, but this will redefine them in org-mode buffers as well.

It would be nice to be able to redefine the colors only for org-journal buffers.

bastibe commented 2 years ago

The display of org-journal buffers is entirely governed by org-mode. There is currently no mechanism available to change this, as far as I know.

presto8 commented 2 years ago

Thanks for the information! I did look through the code and didn't see anything, so this confirms my findings. I may investigate trying to extend org-faces into org-journal-faces. I am new to elisp so I am not sure how big a job this would be :-)

presto8 commented 2 years ago

Easy enough! This seems to work and can just be added to the user's .emacsrc so no need for a change to org-journal.

(add-hook 'org-journal-mode-hook
  (lambda ()
    (face-remap-add-relative 'org-level-2 '(:foreground "white" :weight 'normal))))