emacs-jupyter / jupyter

An interface to communicate with Jupyter kernels.
GNU General Public License v3.0
934 stars 92 forks source link

Command to clear input #512

Closed egr95 closed 10 months ago

egr95 commented 10 months ago

Thank you for this awesome package!

I was wondering if there is any command to clear the text we have typed at the prompt in a python REPL. Basically an equivalent of the comint-kill-input command (bound to C-c C-u in the inferior shell) but for the emacs-jupyter REPL. This would come handy because I often find myself manipulating some large (multiline) python expression in the REPL prompt, and decide I just want to delete it and start afresh. In a vanilla ipython session, C-c clears the prompt, but I haven't found any equivalent in the emacs-jupyter REPL and sometimes find myself having to manually select all the text in order to delete it.

nnicandro commented 10 months ago

Thanks for the suggestion, I've implemented the command, bound to C-c C-u in the REPL buffer by default.

egr95 commented 10 months ago

Thank you, that works!