12

What is happening:

>>> 2 * 10
2 * 10
20
>>> 

What I want to happen:

>>> 2 * 10
20
>>> 

Does anyone know why the command is printed out before being executed and how to stop it from doing that? I can't find any documentation about this. I'm using Emacs 23 on Mac OS X with Python 2.7.

methodmain
  • 230
  • 2
  • 11

1 Answers1

12

I don't use python, but I would guess that the python feature you are using has set the variable comint-process-echoes incorrectly. Whatever the value in your buffer is, just reverse the boolean value.

Comint is a support library in Emacs for running inferior processes in Emacs. It interacts with the prompts, and the python shell (or M-x shell) needs to be told about the echo feature.

In your shell buffer with the problem, do:

M-: (setq comint-process-echoes t)  ;; or nil
Eric
  • 3,959
  • 17
  • 15
  • 2
    This works for me, too! I wonder if you can help with [my question](http://stackoverflow.com/questions/9830729/emacs-python-echoing-hooks-and-org-mode) which regards running this in a hook every time python starts up? – alexplanation Mar 30 '12 at 19:47
  • @Eric I am using Elpy on Emacs in ubuntu I do have the same problem but this solution is not working.Can help me out – Nithin Varghese Jan 17 '18 at 16:59
  • I have found solution by setting the variable **elpy-shell-echo-input** to nil – Nithin Varghese Jan 17 '18 at 17:04