I am quite new to Emacs.
When running Emacs’ python interpretor, it does
>>> print(24)
print(24)
24
Is there a way I can prevent the re-printing of my input and make it as below?
>>> print(24)
24
Thank you so much 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The trick here is that the buffer you’re running the python process in doesn’t have
comint-process-echoesset.There are a couple of other questions that are relevant to your problem.
How to turn off the echoing
How to set emacs so it always turns off echoing
But the basic gist is you need to customize the value of
comint-process-echoes. If you are new to emacs, you might not know that most customizations are done using emacs lisp, where setting a variable looks something like this:In this case, the variable we want is
comint-process-echoesso the lisp we want to evaluate is:Where
tis lisp-speak for “true.”So, to borrow the advice of the first link above, to actually tell emacs to evaluate this lisp code, use the
M-:(meta+colon) command. From the python shell buffer, type meta+colon, then type(setq comint-process-echoes t)then hit return. Your problem should be solved.