                 if @latex_editor.has_uncommitted_changes()
                     delete @_last_update_preview  # running latex on stale version
                     @get_rnw_concordance_error = false
-                #@dbg("update_preview(force=#{force}, only_compile=#{only_compile}): run_latex")
+                #@dbg("update_preview(#{misc.to_json(opts)}): run_latex")
                 @run_latex
                     command      : @load_conf_doc().latex_command
                     cb           : cb
             (cb) =>
                 if only_compile
                     cb(); return
-                #@dbg("update_preview(force=#{force}, only_compile=#{only_compile}): preview update")
+                #@dbg("update_preview(#{misc.to_json(opts)}): preview update")
                 preview_button.icon_spin(true, disable=true)
                 @preview.update
                     cb: cb

                    @preview.pdflatex.trash_aux_files (err, _log) =>
                        cb(err)
                (cb) =>
                    @update_preview(cb, true, true)
            ], (err) =>
                run_recompile.icon_spin(false, disable=true)
            )

        @latex_editor.save (err) =>
            cb?(err)
            if not err
                save_cb =  =>
                    if @_current_page == 'pdf-preview'
                        @preview_embed?.update()
                @update_preview(cb:save_cb, force:force)
                @spell_check()

    update_preview: (opts) =>
        {cb, force, only_compile} = opts = defaults opts,
            cb           : undefined
            force        : false
            only_compile : false
        # force: continue, even when content hasn't changed
        # only_compile: avoid the preview rendering
        # obvious TODO: untangle preview update and run_latex
