LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Emacs color-theme and Cannot load file error (https://www.linuxquestions.org/questions/slackware-14/emacs-color-theme-and-cannot-load-file-error-947515/)

derrekito 05-30-2012 12:27 AM

Emacs color-theme and Cannot load file error
 
Hi all,

I've been trying to get color-theme to work on Emacs 23.4.1, but I receive the following error after launching Emacs:
Code:

File error: Cannot open load file, color-theme
I have installed color-theme via http://slackbuilds.org/repository/13...e/color-theme/
Here is a portion of my .emacs file:
Code:

(add-to-list 'load-path "~/.emacs.d/color-themes")
(require 'color-theme)
(eval-after-load "color-theme"
  '(progn
    (color-theme-initialize)
    (color-theme-tomorrow)))

My color-theme.el file is located at
Code:

/usr/share/emacs/site-lisp/color-theme.el
Any help is appreciated.

EDIT:

I found that my EMACSLOADPATH is pointing to /usr/local/share/blah blah blah instead of /usr/share/blah blah blah
I'll update this as I go along. As a side note, I'm using Slackware. I used a slackbuild to install this, but it installed in /usr/share instead of /usr/local/share, so it seems that I had two versions installed and libraries in only one location.

I'm currently trying to installed color-theme manually, but make or make install isn't working for this.

EDIT:

I was never able to overcome the compile error from color-theme so I decided to go diving into the SlackBuild. After doing so I noticed a particular line that references /usr/ and I changed it to /usr/local and this fixed the problem. Turns out Slackware is a bit weird and installed the distribution version of emacs into /usr/share and so the SlackBuild for color-theme reflected that.

The updated script can be found at http://pastebin.com/VymnDzJ3

CREDIT/PROPS is given to emit from #emacs for helping/doing all the real work.

cmk77 05-31-2012 02:45 AM

Thanks for sharing!

cathectic 06-03-2012 06:01 AM

I have a slightly different SlackBuild for color-theme, which also takes care of byte compiling it for Emacs, so it doesn't need to every time you start Emacs:

http://strangeworlds.co.uk/git/?p=sl...eme.SlackBuild

With this, I've never had the need to edit EMACSLOADPATH.


All times are GMT -5. The time now is 01:47 PM.