sage-mode does not work

i like this post (click again to cancel)
0
i dont like this post (click again to cancel)

System information

64-bit Linux OS
GNU Emacs 24.1.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars) of 2012-06-25
sage-mode-0.7

Installation

On sage-mode project page it is said that sage-mode should be installed with the following command:

sage -f sage-mode-0.7.spkg

This does not work though sage-mode-0.6.spkg can be installed this way without any problems.

In order to install this package I had to download it manually. Here is the correct installation command:

sage -f ~/Downloads/sage-mode-0.7.spkg

I have put the following code into my emacs.el:

(add-to-list 'load-path (expand-file-name
                         "/home/maksim/Applications/sage/data/emacs"))
(require 'sage "sage")
(setq sage-command "/home/maksim/Applications/sage/sage")

Syntax highlighting

Running M-x sage-mode in Emacs leads to the following error message:

Symbol's value as variable is void: python-source-modes

though package python is a built-in one and works well.

In order to avoid this problem I have added the following code:

(setq python-source-modes 'python-mode)

This made sage-mode work properly (at least syntax highlighting).

run-sage

run-sage command does not work. It reports

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

Setting this variable to nil does not help:

Symbol's function definition is void: python-args-to-list

The file .../lisp/progmodes/python.el in the Emacs distribution does contain this function.

asked Jun 28 '12

Maksim Zholudev gravatar image Maksim Zholudev
1 2

updated Jun 28 '12

3 Answers:

i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

I can't help with the rest, but the "current" Sage-mode is still 0.6, as listed at the list of optional spkgs. That is what this will do without a URL.

But if you specify a URL for sage -f http://url/for/sage-mode-0.7.spkg, that should work fine. I've opened Trac 13176 for upgrading the optional spkg to this.

link

posted Jun 28 '12

kcrisman gravatar image kcrisman
6639 13 66 150

updated Jun 28 '12

I have also tried 0.6 and saw no difference

Maksim Zholudev (Jun 28 '12)

You mean no difference in the other problems? Unfortunately, I can't help with those :( but I'll note them at the relevant ticket.

kcrisman (Jun 28 '12)
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

It sounds like (based on the python-source-modes error) you are using fgallina's new python.el. Sadly, sage-mode doesn't support that yet. I have an experimental spkg with some support. If you want to try and report any problems to bitbucket (or even better submit patches/pull requests), that would be great. You can comment on the fgallina ticket, or create new ones.

link

posted Jun 28 '12

Ivan Andrus gravatar image Ivan Andrus flag of United States
203 3 12

Ok, I thought you were the maintainer. Can you update http://wiki.sagemath.org/sage-mode accordingly? I guess just updating the contact, bitbucket link (in the sense that yours is now the "official" repository) and maybe making sure to continue to attach old versions there, if we deem that useful. Otherwise people will keep contacting Nick.

kcrisman (Jun 28 '12)

New version is hard to install if Sage was installed as normal user. SAGE_ROOT and SAGE_DATA are not defined (incorrect Sage installation?) and one have to set them for the user and also for root (the installation script requires root privileges to do something with Python).

Maksim Zholudev (Jun 29 '12)

New version does not have python-source-modes problem but still reports about undefined sage-buffer variable after M-x run-sage. Setting sage-buffer to nil lets me run Sage but it reports "Symbol's function definition is void: python-send-string". The buffer with Sage appears but I can not type anything there.

Maksim Zholudev (Jun 29 '12)

I can move cursor in that buffer. When I try to type numbers there is no response. Attempt to type letters make Emacs behave like I do something wrong (e.g. move up when at the top of buffer).

Maksim Zholudev (Jun 29 '12)

I've updated the wiki, and SPKG.txt.

Ivan Andrus (Jun 29 '12)
see 6 more comments
i like this answer (click again to cancel)
0
i dont like this answer (click again to cancel)

Ergoemacs 1.9.3.1 changes load-path variable and makes Emacs load some packages from wrong place, i.e. ergoemacs_1.9.3.1/packages.

Ergoemacs contains old version of python-related modules. The problem can be solved by [re]moving some files from ergoemacs_1.9.3.1/packages directory. For this particular issue they are python.el, python.elc, python-mode.el and python-mode.elc.

link

posted Jul 02 '12

Maksim Zholudev gravatar image Maksim Zholudev
1 2

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

1 follower

Tags:

Stats:

Asked: Jun 28 '12

Seen: 198 times

Last updated: Jul 02 '12

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.