5

first i do this in a terminal: $ git clone git://github.com/altercation/solarized.git, that creates a directory in my home called "solarized", after that i add this 2 lines to my init.el

(add-to-list 'load-path "~/.emacs.d/emacs-color-theme-solarized") (load-theme 'color-theme-solarized.el t)

so i created a directory emacs-color-theme-solarized in ".emacs.d" and i put there the code of the color-theme.., but when i "byte-compile and load"my init.el this message came in the mini-buffer: load-theme: Unable to find theme file for `color-theme-solarized.el'

what i did wrong?

Kaushal Modi
  • 25,203
  • 3
  • 74
  • 179
  • Sorry for my poor skills in StackExchange, but I try to comment to https://emacs.stackexchange.com/a/15121/23571 failing miserably. Please help me and make this better. As a comment to https://emacs.stackexchange.com/a/15121/23571 : I needed to run `M-x package-refresh-contents` before `M-x package-install` similar to what @user66649 reported in the comments. I have a very new Emacs 26 installation and I had not used package manager before. If I did not run the `M-x package-refresh-contents` the `M-x package-install` would not have any packages to install. I guess this is common knowledge, but – Petri Sirkkala May 24 '19 at 10:57

2 Answers2

9

github.com/altercation/solarized.git is the repository for the Solarized theme for vim.

For emacs, the repo is https://github.com/bbatsov/solarized-emacs.

The recommended approach to install the theme is via the emacs-inbuilt package manager.

Ensure that you have the below in your emacs setup (~/.emacs.d/init.el by default):

(require 'package)

;; Add melpa package source when using package list
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)

;; Load emacs packages and activate them
;; This must come before configurations of installed packages.
;; Don't delete this line.
(package-initialize)
  • Add above to your init.el and restart emacs.
  • Do M-x package-install solarized-theme (from the Installation instructions on the theme github page).
  • Do M-x load-theme and pick one of the Solarized theme variants.
Kaushal Modi
  • 25,203
  • 3
  • 74
  • 179
  • i did M-x package-install , but i can't find "solarized-theme"... – Ariel Marcelo Pardo Aug 27 '15 at 23:00
  • now i did M-x package-list-package and i found "sanitynic-solarized" and i found a bottom that said install so i did, and that works...what did i do? – Ariel Marcelo Pardo Aug 27 '15 at 23:12
  • 'sanityinc-solarized' is not the same. You should be able to find `solarized-theme` when you do `M-x package-list-packages` if you added Melpa to the `package-archives` list as shown above. After saving that to your `init.el`, did you restart emacs? – Kaushal Modi Aug 28 '15 at 01:48
  • no, i think not, how do i restart? i closed emacs, i do not restart it – Ariel Marcelo Pardo Aug 28 '15 at 02:26
  • Save the above to your `init.el`, quit emacs using `C-x C-c` and then start emacs again from the terminal. – Kaushal Modi Aug 28 '15 at 03:10
  • 1
    The solarized-theme tar is not available in Melpa anymore. –  Feb 02 '17 at 15:11
  • @kadaj I am not sure what you mean by tar. Packages from Melpa are installed using the emacs inbuilt package manager. Here is the `solarized-theme` on Melpa: https://melpa.org/#/solarized-theme – Kaushal Modi Feb 02 '17 at 17:11
  • Kaushal: When you give the install command it gives an error saying that the solarized-theme-xxx.tar is not found. –  Feb 02 '17 at 17:25
  • Please report this [issue on Melpa's github page](https://github.com/melpa/melpa/issues). This looks like an intermittent issue. I wouldn't phrase it as *not available in Melpa anymore* :) – Kaushal Modi Feb 02 '17 at 17:28
  • 3
    This worked, but I had to run `M-x package-refresh-contents` before `M-x package-install` found `solarized-theme` – user66649 Apr 28 '17 at 00:02
2

The version that works best for me is on MELPA at

https://github.com/bbatsov/solarized-emacs

In your packages install, you can install it through MELPA using this command:

M-x package-install solarized-theme

If you can't find solarized-theme, then make sure MELPA is installed properly.

Emacs User
  • 5,553
  • 18
  • 48