reddit / emacs

IPython interpreter In[ ] prompts within Emacs

doolio_ · 2022-09-26 07:52
When I use the IPython interpreter within Emacs the \`In \[number\]\` prompt numbers are not always sequential. Several numbers can be skipped from one prompt to the next. It tends to occur when sending a python buffer to the interpreter or executing a script from within the interpreter buffer. This does not happen with using the same interpreter within a terminal. Is this the case for others or just me so an issue with my configuration? Is it because Emacs is doing something under the hood which is 'using up' the prompts? Thanks.
SaiDuc · 2022-09-26 08:18
I think when you send a region or a buffer to the prompt, each line in the sent region is executed as a separate line (so as if you typed that line and hit enter. So the prompt number is incremented for each sent line).
doolio_ · 2022-09-26 09:04
Ah, I see thank you.