     editor = @getEditor()
     @saveFile editor
     uri = editor.getURI()
-    @messages.attach()
-    @messages.show()
-    @messages.clear()
-    @messages.setTitle 'Idris: Typechecking...'
-
-    successHandler = ({ responseType, msg }) =>
-      @messages.attach()
-      @messages.show()
-      @messages.clear()
-      @messages.setTitle 'Idris: File loaded successfully'
+    @clearMessagePanel 'Idris: Typechecking ...'
+
+    successHandler = ({ responseType, msg }) =>
+      @clearMessagePanel 'Idris: File loaded successfully'
 
     @model
       .load uri

    uri = editor.getURI()
    line = editor.getLastCursor().getBufferRow()
    word = @getWordUnderCursor editor

    successHandler = ({ responseType, msg }) =>
      # param1 contains the code which replaces the hole
      # param2 contains the code for the lemma function
      [lemty, param1, param2] = msg
      param2 = @prefixLiterateClause param2

      editor.transact ->
        if lemty == ':metavariable-lemma'

  # open the repl window
  openREPL: ({ target }) =>
    uri = @getEditor().getURI()
    @clearMessagePanel 'Idris: opening REPL ...'

    successHandler = ({ responseType, msg }) =>
      @hideAndClearMessagePanel()

      options =
        split: 'right'
        searchAllPanes: true
