emacs-jupyter/jupyter

Better interface for handling input requests a kernel makes to a user

Open

#184 opened on Sep 20, 2019

 (0 comments) (1 reaction) (0 assignees)Emacs Lisp (106 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (1,028 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

A kernel may send an input request to a user, e.g. requesting a password. Currently this is handled by displaying a prompt and having the user enter input in the minibuffer. This works well for simple cases, but there is room for improvement since you can't easily leave the minibuffer until valid input is sent to the kernel.

I'm proposing the following to make the input request interface more intuitive (most of which is mentioned in https://github.com/dzop/emacs-jupyter/issues/35#issuecomment-497039866 and the following comments):

  1. In the minibuffer, when the kernel is asking for input, allow the user to exit the minibuffer temporarily while the kernel is still waiting for input. This way a user can use Emacs normally if they, e.g. want to copy text from some buffer to send to the kernel.
    • This would be done by binding a key in the minibuffer map to a function that enters a recursive-edit and having this binding be prominent in the minibuffer, e.g. by mentioning it in the minibuffer prompt. An additional binding will be added when in the recursive-edit to drop back into the minibuffer.
  2. Have a way to enter multiline input easily by allowing the user to bring up a temporary buffer whose contents will be sent to the kernel whenever C-c C-c. I'm thinking along the lines of how magit asks for a commit message.
    • Note this buffer would not necessarily be for code, but for textual input the kernel is requesting the user provide which may or may not be code.

Does anyone have other ideas?

Contributor guide