   evalAll: ->
     editor = atom.workspace.getActiveTextEditor()
     atom.commands.dispatch atom.views.getView(editor), 'inline-results:clear-all'
-    @client.evalall({
-                      path: editor.getPath()
-                      module: editor.juliaModule
-                      code: editor.getText()
-                    }).then (result) ->
+    evalall({
+              path: editor.getPath()
+              module: editor.juliaModule
+              code: editor.getText()
+            }).then (result) ->
         notifications.show "Evaluation Finished"
 
   showError: (r, lines) ->

{paths} = require '../misc'
modules = require './modules'

module.exports =
  client: client.import
    rpc: ['eval', 'evalall']
    msg: ['cd']

  cursor: ({row, column}) ->
    row: row+1

  eval: ->
    editor = atom.workspace.getActiveTextEditor()
    for sel in editor.getSelections()
      evaluate(@evalData(editor, sel)).then ({start, end, result, plainresult}) =>
        if result?
          error = result.type == 'error'
          view = if error then result.view else result
