Emacs 24: Unable to find theme file for `solarized-dark.

前端 未结 1 434
说谎
说谎 2021-02-10 12:12

I am on Mac 10.9.5 using Emacs 24.4

Following the instruction in here: https://github.com/sellout/emacs-color-theme-solarized , I downloaded the emacs-color-theme-

相关标签:
1条回答
  • 2021-02-10 13:01

    Emacs 24 includes package.el, and I strongly recommend using that to install packages whenever possible. Versions of the Solarized theme are available from MELPA Stable, MELPA, and Marmalade.

    If you haven't used any of these package repositories yet, you'll need to add one by putting something like this in your init file:

    (require 'package)
    (package-initialize)
    
    (add-to-list 'package-archives
                 '("melpa-stable" . "http://stable.melpa.org/packages/") t)
    

    Then use M-x package-list-packages, search for color-theme-sanityinc-solarized, mark it for installation with i and then install marked packages with x. I find this package list interface very handy for discovering new packages.

    Packages installed this way generally go into ~/.emacs.d/elpa/, e.g. ~/.emacs.d/elpa/color-theme-solarized-2.27/. This should automatically be added to your custom-theme-load-path, which is required for load-theme to work.

    Note that this particular version includes two themes prefixed with the package maintainer's name, so you'll have to do something like

    (load-theme 'sanityinc-solarized-dark)  ; or
    (load-theme 'sanityinc-solarized-light)
    

    to make the theme load. Interactively, load-theme supports tab completion, which is probably the best way to see what installed themes are actually called.

    As an aside, you might also want to look into tools for automating the package.el install process, which is especially handy if you work on multiple machines.

    0 讨论(0)
提交回复
热议问题