This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: emacs-23.2-3 and DBus


On 10/4/2010 11:47 PM, nyc4bos@aol.com wrote:
Thank you for your work on incorporating Emacs and DBus!

Can you tell me how you are testing it?

I tried to use notifiations.el (from the Emacs 24 trunk).

After loading it, Emacs appears to freeze and I see that
the emacs and winlogin.exe processes consume almost all of
the CPU.

After about 30 to 45 minutes, I pressed `C-g' and saw the
message "Back to top level.".

However, Emacs is still frozen and the only thing I could
do is to kill emacs from outside of emacs.

Please send Cygwin questions to the Cygwin mailing list, not to individual maintainers.


I know virtually nothing about D-Bus. To test it, I simply followed the instructions given by Michael Albinus in the thread http://cygwin.com/ml/cygwin/2010-08/threads.html#00330 . Here's a brief summary:

1. Start the messagebus service.

2. Start a dbus session (eval `dbus-launch --auto-syntax`) in a shell.

3. echo $DBUS_SESSION_BUS_ADDRESS .

4. In a different shell, set (and export) $DBUS_SESSION_BUS_ADDRESS to this value, and run dbus-monitor --session .

5. Start Emacs in the first shell, and load the dbus library. You should see output from dbus-monitor in the other shell, showing that an application has started. It will also tell you the name of that application, like ":1.1".

6. In Emacs, evaluate (dbus-get-unique-name :session) . You should get the same name.

7. 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)

8. Now you could open any other D-Bus application, and you should be
notified in Emacs (in the echo area and the *Messages* buffer). For example, you could try dbus-monitor --session , started in the same shell where you started Emacs.


I'm afraid that's all I know. Unless you think there is a Cygwin-specific problem, further questions should probably be directed to one of the Emacs lists, where you will find people who are knowledgeable about D-Bus integration in Emacs. BTW, there has been quite a bit of development of this integration since the release of Emacs 23.2. Some improvements will appear in Emacs 23.3, and some won't appear until 24.1. So if you're trying to use a library from the Emacs 24 trunk, it's possible that it's simply not compatible with Emacs 23.

Ken

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]