       else
         editor.setValue DEFAULT_VALUE
         editor.gotoLine 0, 0
-      #value = localStorage.edit__autosave_value || DEFAULT_VALUE
-      #line = localStorage.edit__autosave_line || 0
-      #column = localStorage.edit__autosave_column || 0
-      
+
     doLocalSave = ->
       storage = DataStore.create 'simple'
       editor = promised.editor

    AUTOSAVE_DELAY = 100
    aceChangedDebounced = _.debounce(aceChanged, AUTOSAVE_DELAY, false)

    aceLoaded = (editor) ->
      promised.editor = editor
      setupAce()
      console.log 'Ace editor loaded!'

      editor.getSelection().on('changeCursor', aceChangedDebounced)

    # Quick fix to prevent aceLoaded from being fired twice in quick succession.
    # Eventually we should figure out what's causing it to be fired in quick
    # succession in the first place.
    aceLoadedDebounced = _.debounce(aceLoaded, 100, true)

    $scope.aceChanged = -> aceChangedDebounced()
    $scope.aceLoaded = (args...) -> aceLoadedDebounced(args...)
    $scope.sendEditorData = ->
      editor = promised.editor
      value = editor.getValue()

DEFAULT_VALUE = '''
# what will you create?
'''

angular.module('edit', ['ui.ace'])
.controller 'EditCtrl', [
  '$scope'
  ($scope) ->

    promised = {}
