Implement stdin protocol
The R readline function should, inside IRkernel, use the Jupyter protocol stdin messages to prompt the user for input.
Slight complication: should we then make interactive() return TRUE? That appears to be the signal that you can use readline(), but it also affects some other bits of behaviour, which we may not want.
there is AFAIK only readline and menu directly using the terminal, everything else uses stdin(). do we have to monkeypatch the former two or is there another solution?
i think we should make interactive() return true. after all the notebook is interactive. we simply need to catch and circumvent the unwanted bits of behavior (e.g. X11/quartz/windows as default device instead of pdf)
+1 for The R readline function should, inside IRkernel, use the Jupyter protocol stdin messages to prompt the user for input.
it would be nice to have this feature. +1
@pieterlukasse @forus sure it would, but i have no idea how to do this cleanly. if you want this, please consider researching how to best intercept the input methods for R’s readline and menu functions.
i.e. if there’s a better way than
unlockBinding('readline', baseenv())
assign('readline', function(prompt = '') { ... }, envir = baseenv())
lockBinding('readline', baseenv())