Let's say I want my file notes.org
to have a specific background color. How to do that? But I want other files to adhere to the standard theme color for background.
So, I want yellow background for notes.org
but the theme background color for everything else.
It should be something simple, but I can't find the way how to do it.
I would prefer a way I can set it via elisp code in my init (.spacemacs) file. Preferably without the need to create a custom theme just for one file etc. The least favorite option is to put it in # Local Variables eval but if the only way it's possible is this way, I will be thankful for even that solution.
(add-hook 'org-mode-hook (lambda () (when (string-match "notes\\.org$" buffer-file-name) (face-remap-add-relative ...))))
The face at issue is nameddefault
and the spec is:background
.(add-hook 'org-mode-hook (lambda () (when (string-match "notes\\.org$" buffer-file-name) (face-remap-add-relative 'stripe-highlight '(:foreground "black" :background "yellow")))))
but it is not working. The background is still white in notes.org. ;((add-hook 'org-mode-hook (lambda () (when (and (not (null buffer-file-name)) (string-match-p "notes\\.org$" buffer-file-name)) (face-remap-add-relative 'default '(:foreground "black" :background "yellow")))))