Closed amelio-vazquez-reina closed 8 years ago
It's actually odd. It's not that I get any errors or anything. It's just that it sometimes (most of the times) it doesn't send anything, but sometimes it does..
In case it's helpful, here is the package that IPython relies on for its terminal: Python Prompt Toolkit. It actually seems to include some code to manage Emacs terms properly.
Also, to clarify, why I say it doesn't work, I specifically mean that, If I do C-RET
on a given line, it most of the times just duplicates the current line without sending code (or %paste
in my case) to it. E.g. of trying several times:
Thanks @ffevotte. No problem at all! (responding here since I think this thread has a better description of the actual problem)
It all happens very quickly, but:
"%paste"
(or %cpaste
, whichever I am using) inserted in the terminal. I see it at the bottom of the buffer for a fraction of a second (i.e. not where the current prompt is).RET
had been inserted. I know this since it just creates a new line with the same prompt index, as in the screenshot above, and that's exactly what IPython does when you just manually enter RET
in the prompt (the index doesn't go up, it just creates a new line).RET
, i.e. it does not see the %paste
so it can't expand it.Does that make sense?
On a related note, in case you don't know this already, one super fast way of testing any Python package is to use anaconda MIT license to install binaries directly. You can have virtual envs. choose which version of what package to install etc.
@amelio-vazquez-reina I encountered the same problem as you. The solution is to make the ipython repl reach past the bottom of the buffer. The way i solved this is by commenting line 272: (goto-char (point-max))
I would like to send a pull request, but I dont know if there are cases where going to "point-max" is nessesary. If not, then the solution would be just to remove that line. Either way i just override the function in my init file after loading isend-mode.
Instead of (point-max) it should be (process-mark (get-buffer-process (current-buffer)))
@albertstartup Thanks for your feedback. Have you also read #8 (not sure exactly why, but this discussion has been split into two parts...)
I agree that your fix should be the correct thing to do. But from the end of the discussion in #8, it looked like it wasn't necessary for recent Emacs versions...
Hi, I have been using
isend-mode
withansi-term
terminals in Emacs very happily for several years now and after upgrading IPython to the latest version 5.0 it stopped working. It looks like they moved away frompyreadline
to something calledprompt_toollkit
.Any thoughts on what could be going on ?