Ask Your Question

Maksim Zholudev's profile - activity

2013-09-30 15:27:54 +0200 received badge  Notable Question (source)
2013-03-07 00:25:09 +0200 received badge  Popular Question (source)
2012-07-02 06:51:32 +0200 answered a question sage-mode does not work

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.

2012-06-29 10:14:58 +0200 commented answer sage-mode does not work

There is no errors but "variable is void: sage-buffer". Even if `sage-mode` is not loaded, it contains the `run-sage` function which calls `sage-new-sage-p` function which causes the error.

2012-06-29 09:57:45 +0200 commented answer sage-mode does not work

It looks like error is caused by `(null sage-buffer)` operator at line 560 in `sage-mode.el`. If `sage-buffer` is not defined at all then `null` fails. [https://bitbucket.org/gvol/sage-mode/issue/7/sage-buffer-variable-is-void]

2012-06-29 09:17:46 +0200 commented answer sage-mode does not work

I have removed `sage/data/emacs` and installed `sage_mode-0.8.spkg`. There is no errors in `*Messages*` on Emacs startup. The only error is "`Symbol's value as variable is void: sage-buffer`" when I run `M-x run-sage`.

2012-06-29 05:23:16 +0200 commented answer sage-mode does not work

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

2012-06-29 05:04:33 +0200 commented answer sage-mode does not work

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.

2012-06-29 05:00:54 +0200 commented answer sage-mode does not work

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

2012-06-28 10:49:45 +0200 commented answer sage-mode does not work

I have also tried 0.6 and saw no difference

2012-06-28 10:48:17 +0200 received badge  Editor (source)
2012-06-28 10:08:23 +0200 asked a question sage-mode does not work

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.