         @latex_editor.save (err) =>
             cb?(err)
             if not err
-                sf =  =>
+                save_cb =  =>
                     if @_current_page == 'pdf-preview'
                         @preview_embed?.update()
-                @update_preview(sf, force)
+                @update_preview(cb:save_cb, force:force)
                 @spell_check()
 
-    update_preview: (cb, force, only_compile) =>
-        force        ?= false
-        only_compile ?= false
+    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

            saved_cb = =>
                if @_current_page == 'pdf-preview'
                    @preview_embed?.update()
            @update_preview(saved_cb)
            @spell_check()

        @latex_editor.syncdoc.on 'connect', () =>
            #if DEBUG then console.log("LatexEditor. syncdoc.on 'connect'")
            @preview.zoom_width = @load_conf().zoom_width ? 100
            setTimeout((=> @update_preview(undefined, false, false)), 1000)
            @spell_check()

        @latex_editor.print = () =>

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