www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/26/00:13:42

X-Recipient: archive-cygwin AT delorie DOT 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 DOT albinus AT gmx DOT de>
To: cygwin AT cygwin DOT com
Subject: Re: Emacs and DBUS
References: <847hjvdyr9 DOT fsf AT aol DOT com> <4C667099 DOT 2020103 AT cornell DOT edu> <87mxsj69st DOT fsf AT gmx DOT de> <4C6C2D11 DOT 8020003 AT cornell DOT edu> <87d3tf685q DOT fsf AT gmx DOT de> <4C6C4BC8 DOT 9010400 AT cornell DOT edu> <87lj7vokyt DOT fsf AT gmx DOT de> <4C74648F DOT 2030203 AT cornell DOT edu> <87d3t7nzez DOT fsf AT gmx DOT de> <4C75226F DOT 9030005 AT cornell DOT edu> <4C752AAB DOT 9000304 AT cornell DOT 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
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Ken Brown <kbrown AT cornell DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019