org-agenda-mode
relies on setting text-properties
for the faces that are used in the *Org Agenda*
buffer. When org-agenda-mode
is enabled in the *Org Agenda*
buffer, the following snippet is used to prevent font-lock-mode
from being enabled:
;; Keep global-font-lock-mode from turning on font-lock-mode
(org-set-local 'font-lock-global-modes (list 'not major-mode))
Emacs does not do well when a marriage is attempted between font-lock-mode
and text-properties
to colorize text within a buffer. It is possible to some degree (with a lot of work), but probably is not recommended (nor worth the effort, in the opinion of this author). Thus, it is usually best to choose one or the other.
In this particular case, the original poster indicated that font-lock-mode
was enabled by using rainbow-mode
. Disabling rainbow-mode
thus resolved the issue.
Overlays play well with both font-lock
and text-properties
. So perhaps the original poster could find a minor-mode that does not use font-lock
to achieve the desired visual effect.
It is possible to create a custom org-agenda-mode
that uses font-lock
instead of text-properties
[which is what this particular author has done], but that entails a lot of work and is ultimately a custom setup tailored to the needs of an individual user.
*Org Agenda*
buffer/mode uses text-properties, not font-lock. Enabling font-lock can have the effect of removing text-properties previously assigned. It may be possible to use a theme with an*Org Agenda*
buffer so long as font-lock is not enabled. The theme would need to set the faces normally used byorg-agenda-mode
, which can also be set using the built-in customize user interface or set manually in the.emacs
or other user-configuration file.rainbow-mode
globally, which turned on font-lock in the*Org Agenda*
, which removed the text-properties. If you'd like to write a short answer I'd be happy to mark it as correct.