sagemath / sage-shell-mode

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

Simple prompt : emergency fix to the incompatibility introduced by IPython 7 in 9.2.beta8 #54

Closed EmmanuelCharpentier closed 3 years ago

EmmanuelCharpentier commented 3 years ago

This emergency fix reverts to readline and adds the --simple-prompt option to the Sage command line (optuon introduced in 9.2.beta9).

A better fix would be to manage Cursor Positioning Requests sent by IPython in the emacs buffer. I don't know how to do this (and a cursory Googleing lets me think that I a m not alone and that this is no an easy task).

This does the job, WorksForMe, and could be useful to some emacs-org-mode users...

HTH,

dimpase commented 3 years ago

not tested, though.

EmmanuelCharpentier commented 3 years ago

Thank you Dima !

I don't expect problems : I have been using it for four months with zero glitch...

simurgh9 commented 3 years ago

But when you run SageMath version 9.0, Release Date: 2020-01-01 with --simple-prompt, you get:

sage-run received unknown option: --simple-prompt
usage: sage [options]
Try 'sage -h' for more information.

This causes sage to fail to run in Emacs.

dimpase commented 3 years ago

I don't think we have resources to maintain compatibility with such old Sage versions. Older versions of shell-mode remain available, use them

simurgh9 commented 3 years ago

The trouble is that I installed sagemath with sudo apt install sagemath and that is the version they are at. However, I was able to resolve the issue with (setq sage-shell:use-simple-prompt nil).