Open tdd11235813 opened 5 years ago
Referring to issue #139: The related PR #144 is the issue, because it was working before the change for me.
Additionally, it seems that not every variable becomes overwritten now. For instance, the color for var
cannot be overwritten after that change.
I replaced the spacemacs-common.el
with the older version, where dyn-let
was used.
Here, everything the variable-thing works again. So why the behavior here is the opposite to what @jjzmajic and @noctuid have seen?
PS:
;; just for testing which color is set
(custom-set-variables '(spacemacs-theme-custom-colors
'(
(str . "#ff0000")
(act1 . "#ff0000")
(act2 . "#ff0000")
(lnum . "#ff0000")
(highlight . "#ff0000")
(green-bg-s . "#ff0000") ; for lazy highlight
(bg1 . "#ff0000")
(keyword . "#ff0000")
(const . "#ff0000")
(type . "#ff0000")
(var . "#ff0000")
(func . "#ff0000")
(base . "#ff0000")
(base-dim . "#ff0000")
(comment . "#ff0000")
)))
(load-theme 'spacemacs-dark t)
Edit: the dyn-let version still might have issues. When I try to use it within another theme, custom colors are mostly not applied, have to play around later. Btw, versions I compared: spacemacs-theme-20181107.1725 vs spacemacs-theme-20190617.633.
I have prepared a minimal example:
git clone --single-branch --branch test-space-theme https://github.com/tdd11235813/emacs_config.git
emacs -l emacs_config/init.el
UPDATE: Do NOT use -l emacs_config/init.el
, this messes up emacs init process.
See git log and the commentary in init.el header. There are three four commits. First commit tests just custom theming with spacemacs-theme. Second one tests the variable issue. Third commit tests combination with heaven-and-hell theme switcher (related heaven-and-hell issue).
Fourth commit shows the current solution for heaven-and-hell combination and customized spacemacs-theme as an own theme, wherein setq
is used instead of custom-set-variables
.
I have also checked a newer dyn-let version, namely spacemacs-theme-20190116.2107, which also showed the same effect.
I have updated the minimal example branch. The combination with heaven-and-hell is also resolved. Using variables within is still not possible.
git clone --single-branch --branch test-space-theme https://github.com/tdd11235813/emacs_config.git $HOME/.emacs.d
cd $HOME/.emacs.d
git checkout HEAD~2 # to test the variable issue
emacs # error => set-face-attribute: Wrong type argument: stringp, my-var
Thanks @tdd11235813 for investigate this issue. I'm travelling currently, I'll look into it when I get back.
As of emacs 26.2 an association list combined with an if-condition fails where the face is defined. The error is:
The init.el configuration with spacemacs-common:
It seems it just expects a string, because a simple variable will now fail too:
I need the condition expression in the face to interactively switch theme settings. However, I am already trying to find other ways how to overload your theme as part of a new theme without redefining everything (while using heaven-and-hell package for switching). Alas, my lisp skill is close to zero and it seems I have to duplicate code to make it work again (no face-defs with if-conditions).
back to issue: It comes with a change in emacs 26.2 backend (<26.2 worked), but could not find a thing in changelog) and on emacs github (files of face functions have not been touched since 2018).
Update: it is not emacs, but the
dyn-let
change in spacemacs-common.el from #144