ipython/ipython — pull request #6488 by jhamrick (2014-09-17 03:33:49+00:00)
Title: Proof of concept for locking cells via metadata

At the dev meeting a couple weeks ago we talked a little about the possibility of having "locked" cells: i.e., cells that can be edited, but not deleted. I imagine this will need discussion and maybe is out of scope, but I thought I would put together a quick proof-of-concept to see how it would work. All that is required is to have `"locked": true` in the cell's metadata, and then the cell will be un-deletable.

This is only as a measure to prevent accidental deletion of cells -- it is not meant to make a notebook read-only, as someone could just go edit the metadata and remove the "locked" attribute.

Probably if this is accepted, there should be additionally a visual indicator that the cell is locked (perhaps a lock icon, or something?) -- otherwise it just seems like delete isn't working.