Ask Your Question
1

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

asked 2013-02-03 07:58:21 -0500

SavageHenry gravatar image

updated 2013-02-03 11:19:47 -0500

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.

edit retag flag offensive close merge delete

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 ( 2013-02-03 10:57:10 -0500 )edit

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 ( 2013-02-03 11:27:22 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-03-20 06:17:47 -0500

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.

edit flag offensive delete link more

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: 2013-02-03 07:58:21 -0500

Seen: 868 times

Last updated: Mar 20 '13