From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Automatic value conversion in DBus bindings Date: Mon, 27 Jul 2009 12:19:10 +0200 Message-ID: References: <22440_1248662818_ZZg0A4O3jD8Bt.00_1248662661.13837.61.camel@localhost.localdomain> <87zlaq7n26.fsf@gmx.de> <13232_1248674000_ZZg0A7P405NBX.00_1248673790.13837.92.camel@localhost.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248690059 21232 80.91.229.12 (27 Jul 2009 10:20:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jul 2009 10:20:59 +0000 (UTC) Cc: "emacs-devel@gnu.org" To: Jan Moringen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 27 12:20:52 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MVNK3-0003mk-Pm for ged-emacs-devel@m.gmane.org; Mon, 27 Jul 2009 12:20:48 +0200 Original-Received: from localhost ([127.0.0.1]:50379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVNK3-0002ND-4i for ged-emacs-devel@m.gmane.org; Mon, 27 Jul 2009 06:20:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVNIl-0001zd-1P for emacs-devel@gnu.org; Mon, 27 Jul 2009 06:19:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVNIf-0001wW-K5 for emacs-devel@gnu.org; Mon, 27 Jul 2009 06:19:25 -0400 Original-Received: from [199.232.76.173] (port=40245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVNIf-0001wM-7S for emacs-devel@gnu.org; Mon, 27 Jul 2009 06:19:21 -0400 Original-Received: from mailrelay2.alcatel.de ([194.113.59.96]:59140) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MVNIe-00047t-HD for emacs-devel@gnu.org; Mon, 27 Jul 2009 06:19:20 -0400 Original-Received: from destgsu0048.stgl.sel.alcatel.de (destgsu0048.de.alcatel-lucent.com [149.204.242.4]) by mailrelay2.alcatel.de (8.13.8/8.13.8/ICT) with ESMTP id n6RAJEpU019972; Mon, 27 Jul 2009 12:19:14 +0200 Original-Received: from slbhn1.alcatel.de (slbhn1.de.alcatel-lucent.com [149.204.90.35]) by destgsu0048.stgl.sel.alcatel.de (8.12.3/8.12.3) with ESMTP id n6RAJEY4019121; Mon, 27 Jul 2009 12:19:14 +0200 (MEST) In-Reply-To: <13232_1248674000_ZZg0A7P405NBX.00_1248673790.13837.92.camel@localhost.localdomain> (Jan Moringen's message of "Mon, 27 Jul 2009 07:49:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) X-Alcanet-virus-scanned: n6RAJEY4019121 at destgsu0048.stgl.sel.alcatel.de X-Scanned-By: MIMEDefang 2.57 on 149.204.45.73 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113210 Archived-At: Jan Moringen writes: > Hi Michael. Hi Jan, > In this case (the code above) the problem is not whether the caller > receives a return value or not, but whether the call returns at all. It > does return fine as long as `test' does not return nil. A value of nil > causes an infinite loop in `dbus-call-method-non-blocking' as I > explained: > >> (while (not (gethash key dbus-return-values-table nil)) >> (read-event nil nil 0.1)) >> >> Here, the return value nil cannot be distinguished from "no return >> value >> yet". Understood. I've committed to the CVS trunk a patch similar to the one you have proposed. > The second problem is not being able to not return any values from a > DBus-invokable function. > > I think that a *reply* is required, too. The problem seems to be, that > it must not have *return values* in it. OK. There is another patch just committed, which allows your function to return the special symbol `:ignore'. In this case, the reply message is sent without any argument, as needed in your case. Your function would look like this: (defun test () :ignore) > I have no idea how I could work around this problem without the ability > to not return any values from a DBus-invoked function. If further > explanations or tests are required, I would be happy to provide them. Could you, please, check whether the patches solve your needs? > Thanks in advance. > > Kind regards, > Jan Best regards, Michael.