Google Groups Home
Help | Sign in
Message from discussion D-Bus in vim, and collaborative editing
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sergey Khorev  
View profile  
 More options May 17 2008, 10:58 am
From: Sergey Khorev <sergey.kho...@gmail.com>
Date: Sat, 17 May 2008 18:58:53 +0400
Local: Sat, May 17 2008 10:58 am
Subject: Re: D-Bus in vim, and collaborative editing

Alban,

There is an in-built Netbeans interface in Vim, it works in GVim only.
(See functions netbeans_Xt_connect, netbeans_gtk_connect,
netbeans_w32_connect which set up async socket handler)

I think you could write a bridge between D-Bus and Netbeans interface as
a separate process.

> I would like to have a support for D-Bus [1] in vim, and then be able
> to write vim plug-ins that use the vim D-Bus connection to communicate
> with external applications. My goal [2] is to be able to control the vim
> buffer from other applications to enable collaboration features (as
> Gobby does) between different editors (vim, emacs) using the same
> D-Bus protocol.

> I don't know the vim code, but with help from the #vim IRC channel, I
> wrote a vim plug-in in python [3] that fires a D-Bus signal each time
> the vim buffer is changed. It seems possible to inform external
> applications of each change of the vim buffer.

> I want also my plug-in to receive to D-Bus methods, so that external
> applications can change the content of the vim buffer. However, I am
> unable to do that with my plug-in because of the way the D-Bus
> connection is implemented in my plug-in.

> The D-Bus connection is an Unix socket. When vim fires a signal from the
> plug-in, some data is sent through the socket to the dbus-daemon
> process. But to receive D-Bus signal, the socket file descriptor must
> be added somehow in the vim main loop in order to call a function to
> read on the socket and I have no idea how to do that from a vim plug-in
> in Python. It may not be possible to do it from a Python plug-in without
> modifying the vim code.

> It seems that this "mainloop" problem is not specific to D-Bus but other
> projects has the same problem:

> - Clewn [4]: GDB support in vim. Clewn is an external program but need
> a patch in vim to work.
> - Slim-Vim [5]: Vim interface to SLIME, the project is abandoned. It
> needed a way to add a socket connection.
> - Eclim [6]: Eclipse integration in Vim: Vim instances communicate with
> Eclipse through the Eclim interface.
> - Vim client-server communication [7]

> The problem is, there is a lot of different projects, I don't know where
> to start looking :)

> Can you explain me the place in the vim code where the main loop is
> implemented? Should I look at some of the above projects or other ones?

> Thanks for your help,

> Alban

> [1] http://www.freedesktop.org/wiki/Software/dbus
> [2] http://alban.apinc.org/blog/2008/05/11/c
> [3] http://people.collabora.co.uk/~alban/d/2008/05/remotecontrol.vim
> [4] http://clewn.sourceforge.net/
> [5] http://wiki.alu.org/Slim-Vim
> [6] http://eclim.sourceforge.net/
> [7] http://vimdoc.sourceforge.net/htmldoc/remote.html


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google