How to disable automatic execution?

Notebooks are currently very eager to re-execute cell contents. They’ll re-run whenever you change focus to another cell.

Is there a setting to disable automatic execution and only re-run the notebook when explicitly requested (for example with shift + enter)?

The current behavior is not great when refactoring a notebook where you need to temporarily break things. As soon as you change focus to another cell to edit, the notebook re-runs, changes your scroll position in the editor (due to missing broken plots), and lights-up with a bunch of errors that I’m not interested in seeing yet.

I don’t think you can quite do this; that reactive behavior is one of the main features of Observable. The closest you could probably get would be to view the notebook in Safe Mode. Unfortunately, the only way I know to get to Safe Mode is to go to your Notebook Tab and click on the three dot contextual menu for the notebook you want:

It would be nice if there were an easy way to get to Safe Mode from the notebook itself. Maybe there is, but I’ve missed it?

If you have an expensive cell and want to temporarily stop it from evaluating while you edit another cell upstream having a syntax error will stop it from executing too. Just add some random character to that cell and remove it when you are done?

We have plans to revisit our … and notebook menu structures. Thanks for the feedback!
Also, you probably know this, but you can just add “/safe” to the url to force safe mode for a notebook.

1 Like

Ooh I did not know that! It is defintely the favorite thing I’ve learned today, though.