Open allefeld opened 3 weeks ago
I don't think Jupyter's notebook execution model includes this information.
So we either:
Let's assume the latter for now. Jupyter does allow this through its comms
: https://jupyter-client.readthedocs.io/en/latest/messaging.html#comm-info
Quarto already uses this in notebook.py
:
We could implement this by sending additional per-cell messages in the quarto_comm
channel (is that what they call this?).
Sounds good!
But, this is something-that-would-be-neat-to-have-sometime, not important.
I suggested in #10541 that knitr's behavior, to replace code of the form
<<label>>
with the code from the referenced cell, for Jupyter kernels. @cscheid replied that this is unlikely to be implemented, and should better be implemented on the side of the kernel.But for this to be possible, the kernel needs to be informed about the label (if any) of each sent code block.