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

  cdHere: ->
    file = atom.workspace.getActiveTextEditor()?.getPath()
    file? or atom.notifications.addError 'This file has no path.'
    @client.cd path.dirname(file)

  cdProject: ->
    dirs = atom.project.getPaths()
    if dirs.length < 1
      atom.notifications.addError 'This project has no folders.'
    else if dirs.length == 1
      @client.cd dirs[0]
    else
      selector.show(dirs).then (dir) =>
        return unless dir?
        @client.cd dir

  cdHome: ->
    @client.cd paths.home()

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

{eval: evaluate, evalall, cd} = client.import rpc: ['eval', 'evallall'], msg: ['cd']

module.exports =

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