       Q(resource)
     else
       @bufferForPath(filePath).then (buffer) =>
-        @buildEditSessionForBuffer(buffer, options)
+        @buildEditorForBuffer(buffer, options)
 
   # Private: Only be used in specs
   openSync: (filePath, options={}) ->


  # Private:
  destroy: ->
    editor.destroy() for editor in @getEditSessions()
    buffer.release() for buffer in @getBuffers()
    @destroyRepo()


    deferred.promise

  # Private:
  buildEditorForBuffer: (buffer, editorOptions) ->
    editor = new Editor(_.extend({buffer}, editorOptions))
    @addEditor(editor)
    editor

  # Private:
  eachEditor: (callback) ->
    callback(editor) for editor in @getEditors()
    @on 'editor-created', (editor) -> callback(editor)

  # Private:
