ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 20 Mar 2013 12:17:47 +0100Can't get sage-mode to load with emacs 24.2.1https://ask.sagemath.org/question/9764/cant-get-sage-mode-to-load-with-emacs-2421/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/?fromgroups=#!topic/sage-devel/HufugiDMyFQ)
5. From command line, did: sage -i http://boxen.math.washington.edu/home/iandrus/sage_mode-0.8.spkg
6. 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. Sun, 03 Feb 2013 14:58:21 +0100https://ask.sagemath.org/question/9764/cant-get-sage-mode-to-load-with-emacs-2421/Comment by fidbc for <p>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: </p>
<p>Symbol's value as variable is void: sage-command</p>
<p>A little history to show how I got here/replication: </p>
<ol>
<li><p>Downloaded and installed Sage 5.6 64bit for OSX (running 10.8.2). </p></li>
<li><p>From within sage, did: install_package('sage-mode'). </p></li>
<li><p>Appeared that sage-mode 0.7 was installed. </p></li>
<li><p>Started emacs, got this error: "Unknown button type `help-xref'"</p></li>
<li><p>Looking at threads, saw it might be a problem solved in the new "experimental" version of sage-mode 0.8.
(threads: <a href="https://groups.google.com/forum/?fromgroups=#!topic/sage-devel/HufugiDMyFQ">https://groups.google.com/forum/?from...</a>)</p></li>
<li><p>From command line, did: sage -i <a href="http://boxen.math.washington.edu/home/iandrus/sage_mode-0.8.spkg">http://boxen.math.washington.edu/home...</a></p></li>
<li><p>Now getting the current error on loading emacs. </p></li>
</ol>
<p>My .init file has: </p>
<pre><code>(add-to-list 'load-path "/Applications/sage/local/share/emacs")
(require 'sage "sage")
(setq sage-command "/Applications/sage/sage")
</code></pre>
<p>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. </p>
<p>Any help is greatly appreciated. </p>
https://ask.sagemath.org/question/9764/cant-get-sage-mode-to-load-with-emacs-2421/?comment=18315#post-id-18315I'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
Sun, 03 Feb 2013 17:57:10 +0100https://ask.sagemath.org/question/9764/cant-get-sage-mode-to-load-with-emacs-2421/?comment=18315#post-id-18315Comment by fidbc for <p>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: </p>
<p>Symbol's value as variable is void: sage-command</p>
<p>A little history to show how I got here/replication: </p>
<ol>
<li><p>Downloaded and installed Sage 5.6 64bit for OSX (running 10.8.2). </p></li>
<li><p>From within sage, did: install_package('sage-mode'). </p></li>
<li><p>Appeared that sage-mode 0.7 was installed. </p></li>
<li><p>Started emacs, got this error: "Unknown button type `help-xref'"</p></li>
<li><p>Looking at threads, saw it might be a problem solved in the new "experimental" version of sage-mode 0.8.
(threads: <a href="https://groups.google.com/forum/?fromgroups=#!topic/sage-devel/HufugiDMyFQ">https://groups.google.com/forum/?from...</a>)</p></li>
<li><p>From command line, did: sage -i <a href="http://boxen.math.washington.edu/home/iandrus/sage_mode-0.8.spkg">http://boxen.math.washington.edu/home...</a></p></li>
<li><p>Now getting the current error on loading emacs. </p></li>
</ol>
<p>My .init file has: </p>
<pre><code>(add-to-list 'load-path "/Applications/sage/local/share/emacs")
(require 'sage "sage")
(setq sage-command "/Applications/sage/sage")
</code></pre>
<p>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. </p>
<p>Any help is greatly appreciated. </p>
https://ask.sagemath.org/question/9764/cant-get-sage-mode-to-load-with-emacs-2421/?comment=18313#post-id-18313Just 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?Sun, 03 Feb 2013 18:27:22 +0100https://ask.sagemath.org/question/9764/cant-get-sage-mode-to-load-with-emacs-2421/?comment=18313#post-id-18313Answer by Ivan Andrus for <p>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: </p>
<p>Symbol's value as variable is void: sage-command</p>
<p>A little history to show how I got here/replication: </p>
<ol>
<li><p>Downloaded and installed Sage 5.6 64bit for OSX (running 10.8.2). </p></li>
<li><p>From within sage, did: install_package('sage-mode'). </p></li>
<li><p>Appeared that sage-mode 0.7 was installed. </p></li>
<li><p>Started emacs, got this error: "Unknown button type `help-xref'"</p></li>
<li><p>Looking at threads, saw it might be a problem solved in the new "experimental" version of sage-mode 0.8.
(threads: <a href="https://groups.google.com/forum/?fromgroups=#!topic/sage-devel/HufugiDMyFQ">https://groups.google.com/forum/?from...</a>)</p></li>
<li><p>From command line, did: sage -i <a href="http://boxen.math.washington.edu/home/iandrus/sage_mode-0.8.spkg">http://boxen.math.washington.edu/home...</a></p></li>
<li><p>Now getting the current error on loading emacs. </p></li>
</ol>
<p>My .init file has: </p>
<pre><code>(add-to-list 'load-path "/Applications/sage/local/share/emacs")
(require 'sage "sage")
(setq sage-command "/Applications/sage/sage")
</code></pre>
<p>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. </p>
<p>Any help is greatly appreciated. </p>
https://ask.sagemath.org/question/9764/cant-get-sage-mode-to-load-with-emacs-2421/?answer=14670#post-id-14670Are 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](http://https://bitbucket.org/gvol/sage-mode/issues?status=new&status=open) for this or any other issue.
There is also a new version [sage_mode-0.9](http://boxen.math.washington.edu/home/iandrus/sage_mode-0.9.spkg). Unfortunately, I'm having a difficult time getting it reviewed to upgrade the spkg so that's it installed by default.Wed, 20 Mar 2013 12:17:47 +0100https://ask.sagemath.org/question/9764/cant-get-sage-mode-to-load-with-emacs-2421/?answer=14670#post-id-14670