Closed topikettunen closed 1 year ago
Is the tok-theme.el
within a subdirectory called tok-theme
? If not then you should only need to specify the subdirectory themes
. In addition, use of window-system
as a boolean is deprecated. You should use display-graphics-p
instead. Also, the :defer nil
line seems unnecessary. if you have use-package-always-defer
set to t
you should use something like :demand t
. Lastly, you should probably use load-theme
within an :init
form rather than :config
. So perhaps something like the following:
(use-package tok-theme
:load-path "themes"
:demand t
:init
(if (display-graphic-p)
(load-theme 'tok t)))
Basically, I have a submodule of my theme as a directory under themes
, currently called tok
, and my use-package as the time of writing this is as follows:
(use-package tok-theme
:load-path "themes/tok"
:init
(add-to-list 'custom-theme-load-path (emacs-path "themes/tok"))
(load-theme 'tok t))
and I have tested it in and out with :demand t
, without it, and other configs that you mentioned, but still it doesn't load without the add-to-list
, which is odd since I do remember it working at some point as I mentioned in the opening post. I mean it's not the end of the world, and currently it works as intended. I was just wondering was there some sort of regression at some point.
Was it always a submodule even when it worked in the past?
It has been both just under themes
and also without being submodule in the subdirectory. I have just since released it in MELPA, which is why I refactored it into its own repo and am using it as a submodule.
OK, I thought perhaps it being a submodule might be the reason but if it didn't worked when the .el
file was just in the themes
directory then it can't be the reason.
;;;###autoload
was the culprit here. Works as intended.
Hi!
I noticed this weird issue on my setup which I'm pretty sure wasn't happening earlier.
Currently when I load my local theme with:
It can't find the theme called
tok
. But when I add:it finds it with no issue. I'm pretty sure that at one point for me adding that
:load-path
worked just fine when loading my theme.There are also no issues when I load the theme with:
So most likely the issue is not in my theme. My theme is located at https://github.com/topikettunen/tok-theme and in there I also do:
which should add the theme to your
custom-theme-load-path
(and it does when I require the theme and load it withoutuse-package
.My theme is also at MELPA so when I load it without
:load-path
, e.g.:it works fine.
Am I doing something terribly wrong here?
Thanks in advance!