ffevotte / isend-mode.el

Interactively send parts of an Emacs buffer to an interpreter
77 stars 17 forks source link

cpaste issue in ipython 5.1 #10

Closed albertstartup closed 6 years ago

albertstartup commented 7 years ago

After #9, everything works fine. Although i use %paste, there seems to be some problems with cpaste. First top level ipython input (i.e. not %cpaste input) doesn't understand "\n". That is fixed in the code below. Second it is hard to deal with indent levels. I don't have a easy fix for that. Feel free to close this issue, its just here for reference.

albertstartup commented 7 years ago

Dont know how to format code so here is the gist: https://gist.github.com/albertstartup/88ffbf42697f1f7e3b73d527e94f3696

ffevotte commented 7 years ago

Thanks for the report, but I'm not sure I understand clearly what's wrong here... Could you please be more explicit about the problem you're having? Which python input fail, and in which way?

Thanks in advance

albertstartup commented 7 years ago

Start a ipython sessioin. If you eval these expressions: (insert "%cpython\n") (term-send-input)

That should just result in an empty line being sent.

If not then the issue might be me. Im using emacs 26.0.50.2, ipython 5.1.0

ffevotte commented 6 years ago

I'm sorry it took so long, but I believe I'va at long last fixed this issue with %cpaste in iPython.

I'm not very proud of the fix, and there is some black magic going on, but isend seems to be useable again for iPython.