     client.import rpc: ['eval', 'evalall', 'evalrepl', 'evalshow'], msg: ['cd', 'clearLazy']
 
 module.exports =
-  currentContext: ->
+  _currentContext: ->
     editor = atom.workspace.getActiveTextEditor()
     mod = modules.current() ? 'Main'
     edpath = client.editorPath(editor) || 'untitled-' + editor.getBuffer().id
     {editor, mod, edpath}
 
+  _showError: (r, lines) ->
+    @errorLines?.lights.destroy()
+    lights = @ink.highlights.errorLines (file: file, line: line-1 for {file, line} in lines)
+    @errorLines = {r, lights}
+    r.onDidDestroy =>
+      if @errorLines?.r == r then @errorLines.lights.destroy()
+
   eval: ({move, cell}={}) ->
-    {editor, mod, edpath} = @currentContext()
+    {editor, mod, edpath} = @_currentContext()
     selector = if cell? then cells else blocks
     Promise.all selector.get(editor).map ({range, line, text, selection}) =>
       selector.moveNext editor, selection, range if move

    opts = properties: ['openDirectory']
    dialog.showOpenDialog BrowserWindow.getFocusedWindow(), opts, (path) =>
      if path? then @_cd path[0]

  _cd: (dir) ->
    if atom.config.get('julia-client.juliaOptions.persistWorkingDir')
      atom.config.set('julia-client.juliaOptions.workingDir', dir)
    cd(dir)

        workspace.update()

  evalAllWeaveChunks: ->
    {editor, mod, edpath} = @_currentContext()
    atom.commands.dispatch atom.views.getView(editor), 'inline-results:clear-all'
    evalall({
              path: edpath
