-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
ef-themes-select-{dark,light} triggers wrong-type-argument on completion #22
Comments
Ah, in this function: (defun ef-themes--load-subset (subset)
"Return the `light' or `dark' SUBSET of the Ef themes.
If SUBSET is neither `light' nor `dark', return all the known Ef themes."
(pcase subset
('dark ef-themes-dark-themes)
('light ef-themes-light-themes)
(_ (ef-themes--list-known-themes)))) In the default case (no subset specified), |
From: Christopher League ***@***.***>
Date: Thu, 8 Jun 2023 05:16:15 -0700
Ah, in this function:
```elisp
(defun ef-themes--load-subset (subset)
"Return the `light' or `dark' SUBSET of the Ef themes.
If SUBSET is neither `light' nor `dark', return all the known Ef themes."
(pcase subset
('dark ef-themes-dark-themes)
('light ef-themes-light-themes)
(_ (ef-themes--list-known-themes))))
```
In the default case (no subset specified),
`ef-themes--list-known-themes` takes care to call
`ef-themes--enable-themes`. But in the light/dark cases, it's just a
list of symbols that won't correspond to loaded themes (unless they
were already loaded through another invocation).
You are right! We need to enable the themes in all cases. Do you want
to submit a patch?
…--
Protesilaos Stavrou
https://protesilaos.com
|
Sure, I can send a patch later today – assuming that's the direction to go (it seems simplest). I was thinking another approach might be to reduce the completion information presented whenever theme-documentation is unavailable (graceful degradation). But my guess is that the uniformity of “load everything ahead of time” is more appealing. |
From: Christopher League ***@***.***>
Date: Thu, 8 Jun 2023 05:51:15 -0700
Sure, I can send a patch later today – assuming that's the direction
to go (it seems simplest). I was thinking another approach might be to
reduce the completion information presented whenever
theme-documentation is unavailable (graceful degradation). But my
guess is that the uniformity of “load everything ahead of time” is
more appealing.
I like the approach of graceful degradation!
I had the "enable everything" approach as a discovery mechanism. Though
that may be too much for existing users who already know the themes they
want.
…--
Protesilaos Stavrou
https://protesilaos.com
|
Hi Prot, I encountered this issue. I'm using current git-main (62723ea). This should reproduce it from scratch, I have emacs-28.2 and will run it within the ef-themes work-tree:
Backtrace is below, but what seems to be happening is that it's trying to put together the annotated theme list for completion purposes, but the
'theme-documentation
property is missing from these symbols, sosplit-string
getsnil
as its first arg.A few more notes:
ef-themes-select-dark
, but not withef-themes-select
.ef-themes-select
before it presents the prompt, that I imagine something is triggering loading all the theme files and property lists. But it's not happening for the select-dark and select-light variants.emacs -Q
, I had been loading a default theme from my init using(ef-themes-select 'ef-frost)
. In this case,ef-frost
has its property list includingtheme-documentation
, but other theme symbols still don't.ef-themes-select-dark
still says "Light" in 2 places. I was about to send a patch just for that typo when I noticed the Lisp error on completion.Thanks!
The text was updated successfully, but these errors were encountered: