neovim/neovim — pull request #1446 by splinterofchaos (2014-11-10 01:33:32+00:00)
Title: [RFC] object_to_vim: Recognize buffers, windows, tabpages.

One day it dawned on me that we could start an embedded nvim instance with `rpcstart()`
```vim
let vim = rpcstart('nvim', ['--embed'])
```
and send commands from within the parent nvim instance!
```vim
call rpcrequest(vim, 'command', 'vim_set_current_line', 'SOME TEXT')
echo rpcrequest(vim, 'command', 'vim_get_current_line') " Prints SOME TEXT
```
but that attempting to get a list of windows, buffers, or tabpages would hit an `abort()` from `object_to_vim()`.
```vim
echo rpcrequest(vim, 'command', 'vim_get_buffers')
echo rpcrequest(vim, 'command', 'vim_get_tabpages')
echo rpcrequest(vim, 'command', 'vim_get_windows')
```
This PR makes the above lines not trigger that abort. Inspired by [vim-misc's xolox#misc#os#exec()](https://github.com/xolox/vim-misc/blob/master/autoload/xolox/misc/os.vim#L82), which spawns another vim instance in order to execute commands asyncronously.