X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0	tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
From: Michael Albinus <michael.albinus@gmx.de>
To: cygwin@cygwin.com
Subject: Re: Emacs and DBUS
References: <847hjvdyr9.fsf@aol.com> <4C667099.2020103@cornell.edu>	<87mxsj69st.fsf@gmx.de> <4C6C2D11.8020003@cornell.edu>	<87d3tf685q.fsf@gmx.de> <4C6C4BC8.9010400@cornell.edu>	<87lj7vokyt.fsf@gmx.de> <4C74648F.2030203@cornell.edu>	<87d3t7nzez.fsf@gmx.de> <4C75226F.9030005@cornell.edu>	<4C752AAB.9000304@cornell.edu>
Date: Thu, 26 Aug 2010 06:13:26 +0200
In-Reply-To: <4C752AAB.9000304@cornell.edu> (Ken Brown's message of "Wed, 25	Aug 2010 10:37:31 -0400")
Message-ID: <87aaoaovtl.fsf@gmx.de>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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

