         opts = defaults opts,
             format : required
             cb     : undefined
+        if @state != 'ready'
+            opts.cb?('not ready')
+            return
         salvus_client.exec
             path        : @path
             project_id  : @project_id

        @element.data("font_size", font_size)

    font_size_change: (delta) =>
        font_size = @element.data("font_size")
        # console.log("font_size_change #{delta} applied to #{font_size}")
        if font_size?

                opts.cb?(err)

    publish_ui: () =>
        if @state != 'ready'
            return
        url = document.URL
        url = url.slice(0,url.length-5) + 'html'
        dialog = templates.find(".smc-jupyter-publish-dialog").clone()
