sagemath / sage-shell-mode

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

Sage mode inserts a lot of space when return is pressed in Emacs. #52

Closed simurgh9 closed 3 years ago

simurgh9 commented 3 years ago

I am not sure what is causing it but each time I press enter this happens,

Screenshot_20200713_033428

reverland commented 3 years ago

me too..and i'm curious about this now..

FYI

edit /usr/bin/sage, change following functions

# Start an interactive Sage session, this function never returns.
interactive_sage() {
    sage_setup
    exec sage-ipython "$@" --simple-prompt -i
}

https://stackoverflow.com/questions/60534394/ipython-warning-in-emacs-your-terminal-doesnt-support-cursor-position-requests

I think its a bug relate to https://github.com/sagemath/sage-shell-mode/issues/48

simurgh9 commented 3 years ago

Yeap! That did the trick. For other readers, run sudo emacs /usr/bin/sage to edit the file. You'll need to change the line exec sage-ipython "$@" -i to exec sage-ipython "$@" --simple-prompt -i as shown in @reverland's reply.