[IPython-dev] custom web notebook cells
Tue Dec 18 07:16:28 CST 2012
Good brainstorming. I think as I*nb becomes more mainstream, we'll see more
code generators (or is it the other way?), so these are good things to hash
Offsets are tricky... this would make it such that editing the cell without
%load_ext blockly is almost guaranteed to break it even if you don't edit
the blockly region's content. delimiter-based stuff would at least be
robust in that fashion. Also, in the case of strongly-whitespaced (lolz)
languages, the delimiters would let you know at what col you need to be
spitting out code... I would hate to be unable to refactor some "naked"
blockly-managed code(eek! Sounds like .net) into a function and lose the
actually, would a %blockly magic be appropriate? That might be at the right
level of "different from source", and presumably magics will eventually be
cross-language, right? Still would have the hard deep, though...
On Dec 18, 2012 7:52 AM, "Jason Grout" <email@example.com> wrote:
> On 12/18/12 5:41 AM, Nicholas Bollweg wrote:
> > but obviously we need some "metadata" (not cell.metadata) in the code to
> > remain robust to users doing interesting things.
> What if you stored the limits of interesting character ranges in the
> cell metadata when the cell is stored? When the cell is instantiated,
> you could mark the relevant ranges with the CodeMirror 3 markText
> function so that the range is continually updated. When the cell is
> saved, you can update the cell metadata with the new ranges.
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev