Ask Your Question
1

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

asked 12 years ago

SavageHenry gravatar image

updated 12 years ago

fidbc gravatar image

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:

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

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

  3. Appeared that sage-mode 0.7 was installed.

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

  5. 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...)

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

  7. 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.

Preview: (hide)

Comments

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

fidbc gravatar imagefidbc ( 12 years ago )

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?

fidbc gravatar imagefidbc ( 12 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

Ivan Andrus gravatar image

Are you sure that's all that's in your .emacs? Please check to see if you are referencing sage-command before you (require 'sage "sage"). Does the problem go away if you comment out the require? Another thing you might trying is completely deleting /Applications/sage/local/share/emacs and reinstalling. You can also run emacs --debug-init to see where exactly the error is occurring.

Please let me know what the problem was so that I can fix it if I need to (e.g. deleting the directory first). Also, feel free to open a ticket on bitbucket for this or any other issue.

There is also a new version sage_mode-0.9. Unfortunately, I'm having a difficult time getting it reviewed to upgrade the spkg so that's it installed by default.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 12 years ago

Seen: 1,206 times

Last updated: Mar 20 '13