# Can't get sage-mode to load with emacs 24.2.1

Apologies for a rather newbie question, but I'm just getting started with Sage. I'd like to be able to use it in my favorite editor -- emacs. Sage seems to work just fine; I'm using it from the command line with no problems. But when I attempt to use sage-mode in emacs, I get this error at startup:

Symbol's value as variable is void: sage-command

A little history to show how I got here/replication:

Downloaded and installed Sage 5.6 64bit for OSX (running 10.8.2).

From within sage, did: install_package('sage-mode').

Appeared that sage-mode 0.7 was installed.

Started emacs, got this error: "Unknown button type `help-xref'"

Looking at threads, saw it might be a problem solved in the new "experimental" version of sage-mode 0.8. (threads: https://groups.google.com/forum/?from...)

From command line, did: sage -i http://boxen.math.washington.edu/home...

Now getting the current error on loading emacs.

My .init file has:

```
(add-to-list 'load-path "/Applications/sage/local/share/emacs")
(require 'sage "sage")
(setq sage-command "/Applications/sage/sage")
```

I've tried a number of things at the command-line level (symbolic link to sage file, editing PATH, editing the SAGE_ROOT directory, etc), but nothing seems to get me past the current error.

Any help is greatly appreciated.

I've had the problem at 4 before. Haven't tried using v0.8. I usually just comment the "offending" line. It is located in `$SAGE_ROOT/local/share/emacs/sage-mode.el` it is line 1161. So change it from :supertype 'help-xref to ;;:supertype 'help-xref

Just installed sage_mode-0.8 and it works fine. In [this question](http://ask.sagemath.org/question/1567/sage-mode-does-not-work) (last answer) it is mentioned that Ergoemacs gets on the way when loading some packages. Perhaps this applies to your emacs configuration?