Referencing private notebooks

Is there are way to reference cells from my own, non-published notebooks?

Not currently. You can only import from a notebook by publishing it.

Just to make sure I understand this correctly.

If I create a new function in a notebook (without making it public), and then I want to create another notebook, I can’t share code, unless I publish it.

Is there a possibility to include this feature any time soon?

Since the launch of “Share link”, you can now share code without publishing notebooks — but the workflow to do so is currently a bit cryptic.

If you click on “Share link” in the private notebook that you’d like to share from, you may then use that notebook’s id in imports from other notebooks.

For example, here’s a “shared” notebook with one cell:

And here’s a draft notebook, importing that cell by using the notebook id:

Of course, now that I’ve revealed this notebook’s id to you, you can import from it freely in the same manner, so if you use this technique — keep your secret ids secret…

2 Likes

Is there any way to “unshare” a notebook; i.e. make it private again after clicking “Share link”?

If not, might I suggest a UI warning that the operation is irreversible?

1 Like

You can fork your notebook and trash the original.

Yes, I expect we’ll add an option to unshare a notebook soon.

3 Likes

Nice! Looks like the unshare feature has shipped.