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 :)
The trick here is that the buffer you're running the python process in doesn't have comint-process-echoes
set.
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:
(setq variable-name new-value)
In this case, the variable we want is comint-process-echoes
so the lisp we want to evaluate is:
(setq comint-process-echoes t)
Where t
is 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With