       EmmetLoadState.PENDING = yes
       emmetPath = globals.acePath.split('/').slice(0, -1)
         .concat(['_ext-emmet.js']).join('/')
-      getscript emmetPath, (err) ->
+
+      getscript prependWithOrigin(emmetPath), (err) ->
         cb err for key, cb of emmetLoadListeners when typeof cb is 'function'
         EmmetLoadState.READY = yes
         emmetLoadListeners = null

FSHelper             = require 'app/util/fs/fshelper'
settings             = require './settings'

module.exports =

class Ace extends KDView


  @registerStaticEmitter()

  getscript prependWithOrigin(globals.acePath), (err) ->
    throw err  if err

    for k, v of globals.aceConfig
      ace.config.set k, prependWithOrigin(v)

    ACE_READY = yes
    Ace.emit 'ScriptLoaded'
