Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use spacemacs-theme-custom colors with variables #139

Closed
cyruseuros opened this issue Apr 4, 2019 · 6 comments
Closed

Cannot use spacemacs-theme-custom colors with variables #139

cyruseuros opened this issue Apr 4, 2019 · 6 comments

Comments

@cyruseuros
Copy link
Contributor

Regardless of whether I use custom-set-variables or setq custom colors are only applied if I explicitly quote an alist. I cannot pass in a variable that contains an alist.

@cyruseuros
Copy link
Contributor Author

I just discover that the issue has nothing to do with variable passing. If I assign the value before a call to load-file (currently developing a wal-based theming engine that can be used without spacemacs theme, but meshes well with it) it works, but if I call it after it fails.

@cyruseuros
Copy link
Contributor Author

For the the record, I'm using wal-theme-load-spacemacs-theme-colors from this package: https://gitlab.com/jjzmajic/wal-theme.el, which I am loading with load-file for now. Interestingly enough, the variable does get set, it just seems it doesn't get set in time to change spacemacs-theme.

@noctuid
Copy link

noctuid commented Apr 14, 2019

I was trying out ewal and ran into this. The current definition of dyn-let makes it so that spacemacs-theme-custom-colors has to be set before loading spacemacs-theme because the value is computed at macro expansion time instead of when the expansion runs. I think it would be better to remove dyn-let entirely and just do something like this inside a let with the default values:

(cl-loop for (var . val) in spacemacs-theme-custom-colors
               do (set var val))

This would fix the issue here and make it possible to later change the custom colors and (re)generate a theme.

@cyruseuros
Copy link
Contributor Author

cyruseuros commented Apr 14, 2019

Amazing! Should I make the changes in a PR branch to test them out or do you prefer to make the chnages? Also what do you think of ewal?

@noctuid
Copy link

noctuid commented Apr 14, 2019

Amazing! Should I make the changes in a PR branch to test them out or do you prefer to make the chnages?

Feel free to make a PR. I won't be able to get around to it immediately.

Also what do you think of ewal?

It looks really good for some of the themes I've tried, and it looks better than the Xresources theme for the colors I've tried (often a lot better). It's also nice that it's easy to change the theme on the fly when using the daemon (e.g. emacsclient --eval '(my-func-to-regenerate-spacemacs-theme)'). There seem to be less colors/text differentation overall compared with most themes; part of that may be because sometimes pywal colors can end up being really similar. I don't know if I mind or not yet; I just started using an ewal theme yesterday. I'll open issues with any concrete suggestions I have.

@cyruseuros
Copy link
Contributor Author

The fewer colors thing is intentional for a more modern look, but you bring up a fair point in that it shouldn't be forced on the user. What do you think about making two functions? One modern/minimal, and the other with all the bells and whistles? If you wanna see all the available colors use describe-variable on ewal-extended-palette and turn on rainbow-mode. Adding more shades is a single parameter in the function, so if you would like more please let me know

cyruseuros added a commit to cyruseuros/spacemacs-theme that referenced this issue May 18, 2019
cyruseuros added a commit to cyruseuros/spacemacs that referenced this issue May 19, 2019
…yer.

Currently, the theme also modifies `spacemacs-dark` if also loaded in
`dotspacemacs-themes`. A
[fix](nashamri/spacemacs-theme#144) for this is on it's
way upstream to `spacemacs-theme`, but the maintainer already gave their
[blessing](nashamri/spacemacs-theme#139).
cyruseuros added a commit to cyruseuros/spacemacs that referenced this issue May 19, 2019
…yer.

Currently, the theme also modifies `spacemacs-dark` if also loaded in
`dotspacemacs-themes`. A
[fix](nashamri/spacemacs-theme#144) for this is on it's
way upstream to `spacemacs-theme`, but the maintainer already gave their
[blessing](nashamri/spacemacs-theme#139).
nashamri added a commit that referenced this issue Jun 10, 2019
Remove dyn-let as discussed in issue #139.
cyruseuros added a commit to cyruseuros/spacemacs that referenced this issue Aug 7, 2019
…yer.

Currently, the theme also modifies `spacemacs-dark` if also loaded in
`dotspacemacs-themes`. A
[fix](nashamri/spacemacs-theme#144) for this is on it's
way upstream to `spacemacs-theme`, but the maintainer already gave their
[blessing](nashamri/spacemacs-theme#139).
smile13241324 pushed a commit to syl20bnr/spacemacs that referenced this issue Aug 16, 2019
…yer.

Currently, the theme also modifies `spacemacs-dark` if also loaded in
`dotspacemacs-themes`. A
[fix](nashamri/spacemacs-theme#144) for this is on it's
way upstream to `spacemacs-theme`, but the maintainer already gave their
[blessing](nashamri/spacemacs-theme#139).
stephanschubert pushed a commit to stephanschubert/spacemacs that referenced this issue Oct 23, 2019
…yer.

Currently, the theme also modifies `spacemacs-dark` if also loaded in
`dotspacemacs-themes`. A
[fix](nashamri/spacemacs-theme#144) for this is on it's
way upstream to `spacemacs-theme`, but the maintainer already gave their
[blessing](nashamri/spacemacs-theme#139).
sei40kr pushed a commit to sei40kr/spacemacs that referenced this issue Nov 11, 2019
…yer.

Currently, the theme also modifies `spacemacs-dark` if also loaded in
`dotspacemacs-themes`. A
[fix](nashamri/spacemacs-theme#144) for this is on it's
way upstream to `spacemacs-theme`, but the maintainer already gave their
[blessing](nashamri/spacemacs-theme#139).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants