waymondo / apropospriate-theme

A colorful, low-contrast, light & dark theme set for Emacs with a fun name
310 stars 19 forks source link

Problem using this theme with use-package and/or theme-changer...? #1

Closed ghost closed 9 years ago

ghost commented 9 years ago

I have the following setup. I've forced loading apropospriate-theme, like you can see in the example, though it's not needed with the solarized-theme.

     (use-package solarized-theme
       :ensure t
       :no-require t)

     (use-package apropospriate-theme
       :ensure t
       :init
       (progn
         (load-theme 'apropospriate-light t t)
         (load-theme 'apropospriate-dark t t)))
     (use-package theme-changer
       :ensure t
       :config (change-theme 'apropospriate-light  'apropospriate-dark))

Only thing I've noticed was this message in the messages buffer, which shows up weather theme-changer is actually loading this theme or not.

Could not load apropospriate-theme

The theme loads and works just fine when the last block is evaluated manually.

i.e. This setup, or indeed simply invoking (load-theme ...) work without any problem. But the said message still appears, regardless of use in theme-changer.

     (use-package theme-changer
       :ensure t
       :config (change-theme 'solarized-light 'solarized-dark))

PS the coordinates required by theme-changer are set separately in my custom.el.

waymondo commented 9 years ago

The guts of the theme are in apropopriate.el, so although the package name is apropopriate-theme you'd need to use-package / require that file instead:

(use-package apropospriate
       :ensure t
       :init
       (progn
         (load-theme 'apropospriate-light t t)
         (load-theme 'apropospriate-dark t t)))

I will update the readme to make this more clear.

ghost commented 9 years ago

Thanks @waymondo great, I didn't see that... the :ensure is for the package name though, and use-package is the require... this works, as in no error message anymore, but theme changer only works if I evaluate manually...

     (use-package apropospriate
       :ensure apropospriate-theme)

     (use-package theme-changer
       :config (change-theme 'apropospriate-light 'apropospriate-dark))

Again, same setup works as expected, with the soalrized-light/dark combo:

          (use-package solarized-theme)
          (use-package theme-changer
            :config (change-theme 'solarized-light 'solarized-dark))
waymondo commented 9 years ago

I actually used solarized as the blueprint for creating the light/dark variations here and the only difference I noticed between them is that I didn't have a dummy apropospriate-theme.el file that would the core theme library. I added this, let me know if that addresses your theme-changer setup.

https://github.com/waymondo/apropospriate-theme/commit/a45aeca587c1391da9829e27a7ee8bb0f17e9b12

ghost commented 9 years ago

Thank you @waymondo . I'm afraid it doesn't. I've noticed this though hadronzoo/theme-changer/issues/7

waymondo commented 9 years ago

With that latest change I was able to load theme-changer with apropospriate like this:

(use-package apropospriate-theme)

(use-package theme-changer
  :init
  (setq calendar-location-name "New York, NY"
           calendar-latitude 41.8
           calendar-longitude -73.59)
  :config
  (change-theme 'apropospriate-light 'apropospriate-dark))

If you try updating from MELPA again does that work for you now?

ghost commented 9 years ago

Yes, it has started working, but I thought it was due to me rearranging my setup... thanks for looking into the issue. Love the theme!

waymondo commented 9 years ago

no problem! glad you are enjoying it