SWISH Notebooks: deleting and printing


I have the two following questions regarding SWISH Notebooks:

  1. I would like to delete a notebook that I made public (whereas protected with save option owner). Is this possible?

  2. When printing a Notebook, only the program cells are printed (text and query cells are ignored). Is there some way to print the whole Notebook?

Thanks a lot in advance!

As is, no. The SWISH store is a git-like store that doesn’t facilitate deletion. You can of course make the notebook empty and save it. That will, as in git, not prevent people to explore the history. I’d guess you can also make the empty saved version private, which makes it a bit hard to find. Anyone knowing the file name or a hash of one of the histories can still access the file though.

Seems not. I think it is mainly not implemented and merely inherits some partial behavior from printing a program. Should be considered a bug.

Ok, thanks!

Hi @jan ,
is it possible to delete a user file having access to the server machine?


AFAIK, there is no implementation for it. It can of course be done. This is roughly what should be done:

From the “head” database (which is either a file or a Redis DB), find the head commit of the file and remove it. That is enough for immediate removal. But, the head database can be reconstructed from the “objects” and this is done in case of corruption. So, to really get rid of the file you need to follow the chain of commits and delete all commits, where you need to consider what to do if you find a “fork”. Finally you should remove all data objects that are no longer reachable. Note that you cannot blindly remove objects as the same object may be part of multiple files (histories).

A final complication is removing the objects. They are created as files, but they are at some point “packed”, combining a lot of objects in a single file.

If you write a predicate for this, please share it.