why cant emacs 24 find a custom theme I added?

前端 未结 4 1037
难免孤独
难免孤独 2021-02-04 12:10

My entire emacs setup is here

I loaded my init-theme.el file here

And supposedly that should make the darkclean theme available.

But when I type M-

4条回答
  •  梦毁少年i
    2021-02-04 12:56

    If you install themes via elpa / package.el you'll notice that you need to add each theme folder into your custom-theme-load-path - this is a bit of a pain to do manually, especially when you take into account upgrades will create a new folder, e.g. 0.1.0 -> 0.1.2 will be a new folder inside your elpa folder.

    Assuming you've installed your elpa packages into ~/.emacs.d/elpa/ add this script to your ~/.emacs.d/init.el

    (require 'dash)
    (require 's)
    
    (-each
       (-map
          (lambda (item)
          (format "~/.emacs.d/elpa/%s" item))
       (-filter
          (lambda (item) (s-contains? "theme" item))
          (directory-files "~/.emacs.d/elpa/")))
       (lambda (item)
          (add-to-list 'custom-theme-load-path item)))
    

    You'll need dash.el and s.el (available from elpa.)

提交回复
热议问题