zenspider / enhanced-ruby-mode

An enhanced ruby-mode for Emacs that uses Ripper in ruby 1.9+ to highlight and indent the source code
Other
217 stars 58 forks source link

color.el dependency not loading for Emacs 23 #24

Closed awood45 closed 11 years ago

awood45 commented 11 years ago

I'll add a stack trace tonight when I get to the affected machine.

Essentially, on Emacs 23 running on Ubuntu, I am unable to load the 'color.el' dependency, and Googling for the source of that file isn't of much help. Emacs 24 on OSX runs fine.

Not sure if this is a problem for everyone or just me, but it definitely isn't working out of the box. If it turns out to be a part of my particular setup, I'll share the workaround.

awood45 commented 11 years ago

Here is the --debug-init output:

Debugger entered--Lisp error: (file-error "Cannot open load file" "color")
  require(color)
  eval-buffer(#<buffer  *load*<3>> nil "/home/alex/emacs-tools/enhanced-ruby-mode/enh-ruby-mode.el" nil t)  ; Reading at buffer position 6107
  load-with-code-conversion("/home/alex/emacs-tools/enhanced-ruby-mode/enh-ruby-mode.el" "/home/alex/emacs-tools/enhanced-ruby-mode/enh-ruby-mode.el" nil t)
  require(enh-ruby-mode)
  eval-buffer(#<buffer  *load*<2>> nil "/home/alex/emacs-tools/emacs-core.el" nil t)  ; Reading at buffer position 2446
  load-with-code-conversion("/home/alex/emacs-tools/emacs-core.el" "/home/alex/emacs-tools/emacs-core.el" nil nil)
  load("~/emacs-tools/emacs-core.el")
  eval-buffer(#<buffer  *load*> nil "/home/alex/.emacs" nil t)  ; Reading at buffer position 126
  load-with-code-conversion("/home/alex/.emacs" "/home/alex/.emacs" t t)
  load("~/.emacs" t t)
  #[nil "\205\264

I'm able to locate the file on my Mac, and not on this machine, so it is possible that Emacs 23 doesn't ship with it. Google is not much help in this regard.

If you have a suggestion on the best way to get around this issue, since alternative coloring schemes probably exist, I'm open to doing the work.

zenspider commented 11 years ago

I would think the best way to go about this is to move the require to a conditional and add the flag that says it shouldn't error, and if it doesn't load the color library, stub out the functions used to no-op. They're just used to lighten/darken, nothing more.

zenspider commented 11 years ago

Fixed