Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage: prompt echos twice #40

Open
sjLambda opened this issue Apr 26, 2018 · 6 comments
Open

sage: prompt echos twice #40

sjLambda opened this issue Apr 26, 2018 · 6 comments

Comments

@sjLambda
Copy link

M-x sage-shell:run-sage opens the shell but with no sage: prompt. Yet sage commands run fine.

then the sage: prompt shows up for some reason, and then it echos the same prompt on enter. Sage: prompt now shows up twice. See attached screen shot.

Versions
: SageMath version 8.1, Release Date: 2017-12-07
: Emacs version: GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G20015))
: org version: 9.1.11

sage-shell-mode version:
;; Version: 0.3

sageprompt

@stakemori
Copy link
Collaborator

Thank you for the report. I will try to reprodue this.

@tani
Copy link

tani commented Nov 1, 2018

I have had same issue at v0.3 but latest version in melpa (not melpa-stable) fixes this issue

  • SageMath version 8.1, Release Date: 2017-12-07
  • GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
    of 2018-05-29

@sjLambda
Copy link
Author

sjLambda commented Nov 5, 2018

sage

Okay, here is what I can report. The echoing of prompt persists.

You were right. I was using melpa-stable version. After downloading from melpa, I noticed it was still marked as version 0.4 though it had several typos (*sagemth->sagemath) corrected. Thanks for these corrections. These correct other errors that used to get in the middle of running scripts. Those got solved. I didn't report them because I wanted to first solve the prompt issue.

In any case, the original problem still persists. See the attached png file. Please write back if you want any more details.

Arigatou gozaimasu

--sjLambda

@sjLambda
Copy link
Author

sjLambda commented Nov 5, 2018

Okay here's some additional information:

I had to delete and re-install both sage-shell-mode and ob-sagemath. Both had changes in melpa that emacs package update was not picking up.

Though the files have changed, the version numbers in those files and the dates on list-packages from melpa do not show that they have been altered. Hence my local package update was no pulling them down.

I forced deleted existing packages and re-installed both those packages.

That solved the echo problem of double prompts. I don't get them now.

But I get a more serious error where Sage hangs for a long time. C-g to abort and then I get this error:

Process Sage illegal instruction: 4

And Sage process is dead. I have to restart sage.

Any light you can shed on this problem?

Arigatou gozaimasu

--sjLambda

@Edark94
Copy link

Edark94 commented Jan 28, 2020

Hello,

I am experiencing the same issue, I'm running GNU Emacs 25.2.2 with SageMath version 8.1, I have nothing but the sage-shell-mode Version: 20191103.1040 installed and using python 2.7 in the background.

See attached screenshot, trying to create a function is impossible.

--Emil B
Screenshot from 2020-01-28 09-53-10

@Edark94
Copy link

Edark94 commented Jan 28, 2020

Solved! https://stackoverflow.com/questions/8060609/python-interpreter-in-emacs-repeats-lines

I don't know exactly what's going on under the hood, but since its a Python interpreter its setting the "comint-process-echoes" incorrectly.
By following the answer in this "https://stackoverflow.com/questions/8060609/python-interpreter-in-emacs-repeats-lines" and writing "M-: (setq comint-process-echoes t) ;; or nil" in my buffer I solved the issue.
Perhaps someone more experienced than me could see what is causing this.

--Emil B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants