From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: dbus-register-method and introspection Date: Sun, 21 May 2023 17:35:07 +0200 Message-ID: <87bkidofys.fsf@gmx.de> References: <87mt1xuchq.fsf@math.uu.se> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16822"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Rahguzar Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 21 17:36:12 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q0l6R-0004Dc-DN for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 21 May 2023 17:36:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0l5n-0000ON-2m; Sun, 21 May 2023 11:35:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0l5W-0000NE-GS for help-gnu-emacs@gnu.org; Sun, 21 May 2023 11:35:17 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q0l5T-0002XZ-LZ for help-gnu-emacs@gnu.org; Sun, 21 May 2023 11:35:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1684683308; i=michael.albinus@gmx.de; bh=9FjHxz/emzHN8gBuPMOyweH/rilLKPPkkVUttu7ksrQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=O52aod8nDDCuLa0FSEG0fq3V3/T8kMfhsbv74lGcZ0MoJhzFn+ym+pogK2IHhtvsY hMAt20NvbsmTAWyqVedRdCtM60N1Bu7Cb/X+pvl+DRgPU2rFuElYT4x1JwUlMiHQow 5ukAXLh0zZz0Q8CGnCQ+YFd7AWJ+P9ryNSHw1FGqDFrV4wLfmlrCz5u6BMNrPMTJ9M 29Iji+3qTZ/H8P5Bid157y5uDqP2kQ0Ryu5AQn4vLDXJbacfcpah3m+BHioTdBrMbn ncUPpKXBORRi/9kj++Dit0f3UAEYWEndVKzvF/9zcmvCBPG/2gKAzwhzw10RCJyy60 Fivz8zeCt4Suw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.13]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGyxX-1pw1zL050V-00E2wP; Sun, 21 May 2023 17:35:08 +0200 In-Reply-To: <87mt1xuchq.fsf@math.uu.se> (rahguzar@zohomail.eu's message of "Sun, 21 May 2023 13:40:23 +0200") X-Provags-ID: V03:K1:TfSHOiFnbVty8TI9t5PtW1h6jvtJza3uBwRmg53Hxh1JKwoN3wl 5ZY+U/PjsluZ5ZAAO2ysp4sw63Cy26lgHedLlUsy/pkzOjc1gxsyQwlIR+ijGmQXVR/IcSU ucBMQYod/vIphdd0YQuS0iu3xytw7VS3EjTihGtqraJFLUTkQPW4HyzODnzk05Ed16Pe+i9 Nl5xOhtdKf6LQ8cjHWRAg== UI-OutboundReport: notjunk:1;M01:P0:ot8Pucw96WM=;6uCbK2CReibWUrcY5RisR5kGO8v bXP3P9jRvsLalEseVpvEDecZcHbQSZPnnMEbFyT5iA5KHQSQe/bz4n8GZOlMpnw72ImfMuAR/ uL5FS6pfvNypSl47AM1UEYoROFj+rpSWM/BdFRZSBtiKYSCxAVauvT/sChIB+2BAf+F/T2u3j 6AXCh98hUTMQ0D4mdG0169OiCjlXeSsFbgyQAkWMV37HVLyFeDJPoxCp/RrXyTog/gqJurd8q XWB9zOd9RXP1rXuI1JgavdMBJsh+LEhNx33/mWEwwzmAGZZNu/1O0JJv2Zis55waFDEZo9klP /MDjrtmDc72UpM7ArRSlLSsFr1YwuotUbsc2pfoLzATWrFK5JTtLC1Cy67YMMiHRIIWSdsJPj qQ2dPcziiGLLV6SJbyPTaiU+bnay/iwASvpe/nzuwKTdxuocvExeAhoQWQDW2KW5uPe66EvU4 ev9faNTryneaslKH/tPwTtZg8UQBN9L8NQblm5OQR4xfKl0ifh7wgrAPgfGfgNKC6UFNAT5Ws HntvzjA0QLgygYPZW3f5S3ZVW19j+sPdZYzokEVxiMzC0RwC3GubUwIn82uENkqowxJnY1ZFB Knwso4lT3oEZXZgyx85vGzuNml9HhNhk6uUYzE4GJ/BOSc1vv0Cv1ZzCLMrg5pzMNX864Taby KZuKqt98Z4wdCztVt6idLEdlH7pT2nSOc6IZn/NUPDFHVKmxZlSqcyrg7Dodwp5hOj6yBpT3/ vkCvoFhrSw31j5d69mAKMx/EIgl4YS/5qQLT1QabsEZ99ldY3iUpFXbEgZdXhTZndRNCNguz Received-SPF: pass client-ip=212.227.17.20; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143695 Archived-At: Rahguzar writes: > Hello all, Hi Rahguzar, > I am playing with the d-bus integration in Emacs 29.0.91. When I > register a method with `dbus-register-method` I am unable to see what > effect it has had. For example if I evaluate the following code in the > node (dbus) Register Objects of the manual, > > > (defun my-dbus-method-handler (filename) (if (find-file filename) > '(:boolean t) '(:boolean nil))) > > (dbus-register-method :session "org.freedesktop.TextEditor" > "/org/freedesktop/TextEditor" "org.freedesktop.TextEditor" "OpenFile" > #'my-dbus-method-handler) > > and then evaluate > > (dbus-introspect-xml :session "org.freedesktop.TextEditor" > "/org/freedesktop/TextEditor") > > I get nil. Similarly I can see the service 'org.freedesktop.TextEditor' > in the application 'd-feet' but clicking on it doesn't show the method > that was registered above and after a while I get a timeout error. This > is in contrast to other services for which I can see what interfaces and > methods they provide. > > Is there a simple way to expose such information for the services > provided from inside emacs? The dbus-introspect-* methods work over the "org.freedesktop.DBus.Introspectable" interface. You must provide an own implementation for this with your "org.freedesktop.TextEditor" service, if you want to see the introspection data. Most existing D-Bus services provide an own file with that data, see directory /usr/share/dbus-1/interfaces (on my Fedora system, it could be somewhere else on your system). When this interface is called, they simply dump out the respective file. > Thanks in advance, > Rahguzar Best regards, Michael.