This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Emacs and DBUS
Ken Brown <kbrown@cornell.edu> writes:
> Hi Michael,
Hi Ken,
> The blocking you observed when dbus.el is loaded doesn't occur with a
> build from the Emacs trunk (r101187). But I don't know how to test
> the dbus functionality after loading dbus.el.
There is a manual, open it with (info "(dbus)")
You could check your own D-Bus name:
(dbus-get-unique-name :system)
(dbus-get-unique-name :session)
You could register for signals sent by the D-Bus:
(defun my-dbus-signal-handler (&rest args)
(message "Signal from bus %s received: %s"
(dbus-event-bus-name last-input-event) args))
(dbus-register-signal
:system dbus-service-dbus dbus-path-dbus dbus-interface-dbus
"NameOwnerChanged" 'my-dbus-signal-handler)
(dbus-register-signal
:session dbus-service-dbus dbus-path-dbus dbus-interface-dbus
"NameOwnerChanged" 'my-dbus-signal-handler)
Now you could open any other D-Bus application, and you shall be
notified in Emacs. Let's use dbus-monitor, started in a shell:
# dbus-monitor --session
# dbus-monitor --system
> If we find it works there, maybe the problem is just a matter of
> backporting some patch to Emacs 23.2.
In Emacs' trunk, there are changes how D-Bus buses are initialized for
polling of pending messages. The intention was to access non-default
buses as well, but it seems to help also for the system and session
buses on cygwin. Backporting would include both dbusbind.c and dbus.el,
because there are dependent changes. I havent't planned it yet for the
Emacs 23 branch, but why not.
> Can you tell me how to test dbus in emacs? Or do you want me to send
> you the executable and let you test it?
Unfortunately, the next 10 days or so I won't have access to a machine
running Windows+Cygwin (I'll be on the road); accessing my email shall
be possible. I'ld like to test it when I'm back.
Thinking about, I prefer an unstripped version of emacs-x11 instead of
emacs-nox for testing.
> Ken
Best regards, Michael.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple