Reputation: 6939
I recently started using MAC OS X Mavericks and I installed Emacs Version 24.3 (9.0) for MAC. Previously I used Emacs 23 on my Ubuntu laptop and everything worked great.
I was trying to reset my .emacs init file on the MAC OS X (using the one I have created time after time on the Ubuntu laptop), but I came across some problems due some modes I used to use:
When I start emacs I get the following error:
File error: Cannot open load file, color-theme
I know this usually happens when Emacs can't find the file but everything worked on Ubuntu, here is the Lisp:
(add-to-list 'load-path "/usr/share/emacs/site-lisp/emacs-goodies-el/color-theme.el")
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-dark-tonio)))
Actually, the file /usr/share/emacs/site-lisp/emacs-goodies-el/color-theme.el exists on my MAC, but I get this error, does someone came across a similar problem and resolved it? What should I do?
Thanks for the attention
Upvotes: 0
Views: 2249
Reputation: 557
Your load path shouldn't point directly to the file itself. Try changing the first line to:
(add-to-list 'load-path "/usr/share/emacs/site-lisp/emacs-goodies-el")
You might also investigate using the new package functionality:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(unless (package-installed-p 'color-theme)
(package-refresh-contents) (package-install 'color-theme))
Which will make it easier to copy your .emacs to a new machine and have it work without the effort of moving all your elisp over.
Upvotes: 3
Reputation: 28541
load-path
should contain the directory in which the file is found. I.e. use (add-to-list 'load-path "/usr/share/emacs/site-lisp/emacs-goodies-el/")
Upvotes: 2