Avoid cell destruction

Hi guys, I’m using Jupyter lab for some years, and I’m happy with it except … when I involuntarily cut one cell without noticing it, and then save … the cell is lost, whatever the time it took to write, and this is not good at all : on very simple way to avoid this would be to eliminate the scissors in the button menu, so that you have to go to the Edit Menu to realize this destructuve operation … I 'm crying today because of that unfortunate operation … André

welcome to the forum!

this might work depending on how far back your loss happened: there probably is a saved notebook inside the hidden .ipynb_checkpoints folder which resides in the same folder as your notebook file. you could retrieve the cell from that copy or use the "Revert to Checkpoint" feature from the File Menu.

…or you could start forcing yourself using git to avoid this (not only with notebooks).

1 Like

“Undo Cell” operation is valid only once. So; as you say, I have to learn to click on the right place. In this particular case, I resolved the problem by exploring my “Time Machine” history (thank you Mac), and resurrected the morning version of the script, which contained the destroyed part … but I maintain that the cissors should be removed from the bar menu .. thank you for your answer

1 Like

It sounds that in a addition to configuring the .ipynb_checkpoints mechanism to store more checkpoints, the new “time travel” (document timeline slider) feature available in jupyter-collaboration extension could have helped you:

1 Like