Another blog entry very early in the morning...
<rant>
As you may know, I am a heavy GNU/Emacs user. I often find myself hitting instinctively C-x C-s to save in any program. It doesn't so much work in Chromium when I am blogging, but I besides a web browser, I probably spend most of my time in this editor. It is not, however, well integrated with anything except itself. Not exactly an official GNOME editor.
So, I've been trying to make a simple script for GNU/Emacs to integrate it with the new Zeitgeist Project from some GNOME developers, which aims to track the documents opened and closed on your computer, then later intelligently relate these data points to allow you to more efficiently use your computer. Now, it's pretty much only good for tracking documents by times, because of the lack of documentation and UI. This project does look very promising, and may be in GNOME soon enough.
Zeitgeist works its magic through freedesktop.org's DBus specification and software package, which facilitates interprocess communication. Software programs contact Zeitgeist, and through a special protocol using DBus's framework, they tell Zeitgeist about an event that it should know about ("Hey! I just made a new document!"). Zeitgeist records this, and sends back an ID and success flag ("What, do you want a cookie?"). This ID can be used for more advanced things, like editing entry.
The problem comes down to documentation.
Documentation for the protocol is not lacking in Zeitgeist—especially with sample plugins in a variety of languages (I found this one in C especially useful.). The people on the mailing list and IRC channel are great people and quite patient.
The lack of documentation comes down to the so-called, "self-documenting editor". New with GNU/Emacs 23 was support for DBus. This adds a great new dimension for desktop integration for Emacs, one that I hope will be explored. Indeed, integrating Emacs with Zeitgeist is only one step. I'd love to have Emacs integrate with so many other applications I use (and I will think of a way to integrate the GIMP with Emacs. Just you wait). In my opinion, DBus support is the best thing to happen to Emacs since X/Windows support.
But, of course, I don't know how to use it.
Oh, sure there are blog entries describing simple things with it, like on Emacs-fu. But there is nothing about that in the online Emacs manual, except this small mention in the acknowledgements:
Michael Albinus wrote dbus.el, a package that implements the D-Bus message bus protocol; zeroconf.el, a mode for browsing Avahi services; and xesam.el, a Xesam-based search engine interface. He and Kai Großjohann wrote the Tramp package, which provides transparent remote file editing using rcp, ssh, ftp, and other network protocols. He and Daniel Pittman wrote tramp-cache.el.Very helpful.
So I looked in the info pages. Oh, wait, that's right. Debian doesn't give them to me, because it doesn't consider them free enough! (Don't get me wrong, I agree. Not a huge fan of the GFDL's restrictions.) I went searching only. Finally, it came to the CVS repo, in which I found the Texinfo file. After building it myself, I finally found the right place...maybe two pages on this awesome new feature? I got the gist of DBus integration, but I still had one nagging error, either brought on by my inexperience with DBus or elisp. My array of strings (required for the Zeitgeist DBus API) was failing. From the manual, it appears that All you have to do is make a list, and have the first item be :array. That seems not to work so well. But I'm stuck here, because I have exhausted almost all of my documentation sources. Tomorrow, I will ask on some Emacs mailing list or forum, but tonight, I go to bed annoyed.
If any of you out there use Emacs and know a little about its DBus integration, I would love to hear from you. Hopefully, I am just failing to notice something simple.
</rant>
by RSS/atom
by email

0 comments:
Post a Comment