macosemacsload-path

Cannot open load file | Emacs doesn't see my .el files even if they exist on MAC OS X?


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


Solution

  • 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/")