You're right, I moved it near the top of my init file, and it works
Solved!
Thanks
On 30/03/2024 12:43, yantar92 at posteo.net wrote:
Kepa<gnu.cognition...@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
inhttps://orgmode.org/manual/Feedback.html#Feedback