sage-shell-mode sending code region to sage-shell only loads file

asked 2020-03-29 22:39:58 +0100

New to both python and sage. I have installed sage-shell-mode in emacs. I tested M-x run-sage, and it starts a shell. I created a test.sage file with three lines

# -*- mode: sage -*-
factor(100)
2+2

I send the code (either by C-c C-c, or first marking a region and then C-c C-r) to the sage shell. It only loads a file, as in

sage: load('/tmp/sage_shell_moder97r9B/sage_shell_mode_temp.sage')

I expected it to show the results.

I am using emacs 26.3 and sage 8.1 on Ubuntu 18.4. I have no special configuration in init.el other than

(require 'sage-shell-mode)
(sage-shell:define-alias)

Thank you for help.

edit retag flag offensive close merge delete