Issue
The doom-color
function retrieves wrong colors when reverting color theme to previously-loaded doom-theme
with consult-theme
Steps to reproduce
- Load a theme
doom-theme-1
with any method - Load another (unloaded) theme
doom-theme-2
withconsult-theme
- Select
doom-theme-1
again withconsult-theme
- The value of
doom-themes--colors
will reflect the palette ofdoom-theme-2
instead of the activedoom-theme-1
, makingdoom-color
return wrong results.
Hacky fix
This problem does not occur using the :ivy
and :helm
completion modules, so I believe it to be an upstream problem with consult
.
I’ve localized the issue to the following expression in consult-theme
:
...
(if (custom-theme-p theme)
(enable-theme theme)
(load-theme theme :no-confirm)))))
;; end of defun
It seems that the issue can be fixed by replacing this with
...
(when theme
(load-theme theme :no-confirm))
via an :override
advice where the rest of the consult-theme
function is the same.