[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: I can't make a custom face to take effect
From: |
Ihor Radchenko |
Subject: |
Re: I can't make a custom face to take effect |
Date: |
Sat, 30 Mar 2024 11:43:59 +0000 |
Kepa <gnu.cognition199@slmails.com> writes:
> I have added a custom face, but it doesn't work unless I do "M-x
> org-mode-restart".
>
> The custom face:
>
> (defun yant/apply-custom-faces ()
> (add-to-list 'org-font-lock-extra-keywords
> '("(\\([^)]*?[A-Z]+[^)]+?[0-9]\\{3,4\\}[^)]*\\))" . (0 'shadow prepend))
> 'append))
>
> (add-hook 'org-font-lock-set-keywords-hook #'yant/apply-custom-faces)
>
> I have tried saving the desktop manually, but it doesn't take effect, I
> have to reload org-mode each session.
I suspect that the part of your config defining the hook is loaded too
late. Try to reproduce the problem starting from emacs -Q, as described
in https://orgmode.org/manual/Feedback.html#Feedback
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>