       editor.getSession().setValue File.read filename
       setMode()
       Chrome.setDirty false
+  editor._emit 'open', { filename }      
 setMode = ->
   if /\.js$/.test filename
     editor.getSession().setMode new JavaScriptMode

  File.write filename, editor.getSession().getValue()
  setMode()
  Chrome.setDirty false
exports.open = open = (path) ->
  filename = path



Chrome.addPane 'main', '<div id="editor"></div>'

exports.ace = editor = ace.edit "editor"
editor.setTheme require "ace/theme/twilight"
JavaScriptMode = require("ace/mode/javascript").Mode
CoffeeMode = require("ace/mode/coffee").Mode
