fniessen / emacs-leuven-theme

This Emacs theme reduces eye strain with a light, high-contrast color scheme, syntax highlighting, and support for multiple modes. Enhance your coding experience! #emacs #theme #coding #orgmode
GNU General Public License v3.0
696 stars 59 forks source link

Move files to "lisp/" directory breaks custom-theme-load-path #84

Closed JiaHong-Lee closed 3 years ago

JiaHong-Lee commented 3 years ago

Hi, I am using the Git version of this beautiful theme. The way I use it is as suggested in README:

(add-to-list 'custom-theme-load-path "/path/to/emacs-leuven-theme")
(load-theme 'leuven t)                  ; For Emacs 24+.

Today, after pulling, I couldn't load 'leuven-dark theme. After a little bit of tinkering, I find out it's caused by https://github.com/fniessen/emacs-leuven-theme/commit/4820d461fae105c0f192bd0194bb7022eb527f33. I can make it works again either by

  1. Using (add-to-list 'custom-theme-load-path "/path/to/emacs-leuven-theme/lisp").
  2. Move the leuven-theme files to /path/to/emacs-leuven-theme.

Personally, I'll suggest the second solution since it works well with other themes such that I can simply load all the themes in this way:

(setq custom-theme-directory (concat user-emacs-directory "themes/"))
(dolist (subdir (directory-files custom-theme-directory t ".*-theme"))
  (add-to-list 'custom-theme-load-path subdir))

--- Cheers, happy hacking.

fniessen commented 3 years ago

Dear @JiaHong-Lee, thanks a lot for the report, and suggestions.

I understand your preference, though I've chosen the first one, for one reason: I'm using now Dotfiler (see https://github.com/svetlyak40wt/dotfiler) to "stow" files from repos under a single place in my HOME directory, and I'd like all my Lisp files to land into my ~/lisp directory.