<p dir="ltr">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 out now.</p>
<p dir="ltr">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 blocks.</p>

<p dir="ltr">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...</p>

<div class="gmail_quote">On Dec 18, 2012 7:52 AM, "Jason Grout" <<a href="mailto:jason-sage@creativetrax.com">jason-sage@creativetrax.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 12/18/12 5:41 AM, Nicholas Bollweg wrote:<br>
> but obviously we need some "metadata" (not cell.metadata) in the code to<br>
> remain robust to users doing interesting things.<br>
<br>
What if you stored the limits of interesting character ranges in the<br>
cell metadata when the cell is stored?  When the cell is instantiated,<br>
you could mark the relevant ranges with the CodeMirror 3 markText<br>
function so that the range is continually updated.  When the cell is<br>
saved, you can update the cell metadata with the new ranges.<br>
<br>
Thanks,<br>
<br>
Jason<br>
<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div>