[IPython-dev] Sending cell contents in the `complete_request` message
Tue Mar 19 05:22:46 CDT 2013
Le 19 mars 2013 à 11:10, Robert McGibbon a écrit :
> The messaging spec. seems to say that the contents of the cell is (or "might be") sent as part of the complete_request message (triggered on the tab key), but looking at the notebook js code, it doesn't look like this is the case. Was it determined that sending the whole cell made the messages too heavy?
Not that I remembered of.
I think it would totally be possible to send the all cell.
IIRC, when I wrote the first implementation of that, I was still learning JS, and tried to make it works.
I might have hard coded the `text` argument and forgot about it.
I'm not even sure line is the full line of the completion as I probably do some preprocessing like removing everything after cursor, and everything between matched bracket.
So this can certain be improved.
You can open an issue about it if you wish.
> Cell magics would really benefit from knowing the contents of the whole cell. For example, the R magic extension could register custom completion logic to run within an %%R cell. But this isn't possible without sending the whole cell (or at least the first line of the cell, so that we can know that we're inside of an %%R cell at completion time).
> This sort of feature is something I would like to make possible for extensions and third-party code to do, via IPEP 11.
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev