sagemath / sage-shell-mode

Emacs front end for SageMath
GNU General Public License v3.0
102 stars 16 forks source link

Improvements to sage-shell-edit #64

Open Eloitor opened 2 years ago

Eloitor commented 2 years ago

I have some proposals to improve the behavior of sage-shell-edit:

1, After C-c C-j, I would like to automatically jump to the next line.

  1. If I'm on the first line of
    for i in range(10):
    print(i)

    I would like C-c C-j to send to sage all the indented code all at once. The same goes for function definitions, conditionals, ...

  2. I would like C-c C-r to reference which region of the code is being run, load('/tmp/sage_shell_modeUYVbcC/sage_shell_mode_temp.sage') doesn't mean much... maybe a reference to the line numbers could be an option, or if the region are a few lines, I would like the lines to be send directly.
  3. After the code has run, sometimes I would like to include the results as comments in the file I'm working with.

I think that I could solve the first issue in my configuration, but it can take me some time, I don't know how to handle the rest.