From unknown Thu Jun 19 14:04:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#41744 <41744@debbugs.gnu.org> To: bug#41744 <41744@debbugs.gnu.org> Subject: Status: 27.0.91; Various D-Bus cleanups Reply-To: bug#41744 <41744@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:04:25 +0000 retitle 41744 27.0.91; Various D-Bus cleanups reassign 41744 emacs submitter 41744 "Basil L. Contovounesios" severity 41744 minor tag 41744 fixed patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 06 19:27:03 2020 Received: (at submit) by debbugs.gnu.org; 6 Jun 2020 23:27:03 +0000 Received: from localhost ([127.0.0.1]:52743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhiDP-0003zt-8q for submit@debbugs.gnu.org; Sat, 06 Jun 2020 19:27:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:35872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhiDO-0003zm-HU for submit@debbugs.gnu.org; Sat, 06 Jun 2020 19:27:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhiDO-0006Lj-B9 for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 19:27:02 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:46393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhiDH-0006AL-HK for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 19:27:01 -0400 Received: by mail-wr1-x42f.google.com with SMTP id x6so13522286wrm.13 for ; Sat, 06 Jun 2020 16:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:user-agent:mime-version; bh=8YG4T+2igRpoXIbIcvgXMVuvTxOu7KzekBj36a7xXSA=; b=1udIuDfdRuvDW3+5zPwepMC9MEykA246gUcwwMtU6+UXuP/JhZArI7WbQ681RkUdtA QWEg6fL7vlzkF7gkamL6rtmrWq7nFTyib6kiAQ3/lr0H0ON3m5teaiJvzBbB9/eMLpur cHgPDlxMLSwzdd4eqJENeB9TfALGdPUYtyise+X6PUCa12e3OksuuTXezMNMXrLjyUXQ zUTlMhmuiCeEQK5f9FeILx29zfysJkRaREAn4VLdm9YjL97zybxOJH5Y8hcQ+isENy10 hyw6RxnAt/VG55WwvHlWlrWT6OIA3EKZtMaRasY5LJT9DFsOeTFDkznkABQOQUY8xYfO XWsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=8YG4T+2igRpoXIbIcvgXMVuvTxOu7KzekBj36a7xXSA=; b=Wso+Q1Spuiehqv94tAmI81N/EW+U9cq82mAwAJ79nf5etB4WT+06PHthjTPHHFKE/V g1E38NN9e2v0Anq+Zd40opV9vXj5gSI/bErU3EBu+Tp67WewnGVdMWZUEDL+9Gl4z7IB 8mMvh2yktpjAbYX/5ZGMNpLUZ3DdiaZoSPORbycOfl5jvsvnRg7f3uQcrR372UOy8j9s Ql9jaVppwzYm3/P1mJgbPq2r6h/gXzqa3eGZXpyspReaj8aDYMH9K/Xo+Y2eUHk35lZY 8NszEOLa1e6TVdC5XR7un+3xZ/Vnhd92OGI5w8bi3wewEhlDxlzaoODpoKbXwnedSvdD ulTg== X-Gm-Message-State: AOAM532/G+IK8jl98THkwGQmXHpNeltlz93f5AT2IeDsNKxw1B1viTyP YlUXiBSTeK2lu1tsPBiIJWsJ2LNFgvs= X-Google-Smtp-Source: ABdhPJwlBNZKHGudSdEOT3lhVmc0GDM6nBophcM7+ALJZ7MGfOIjvhOzVPc5nD5pabkU/mBEvmuCPw== X-Received: by 2002:a5d:4e87:: with SMTP id e7mr15499865wru.427.1591486013100; Sat, 06 Jun 2020 16:26:53 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id k17sm19017504wrl.54.2020.06.06.16.26.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jun 2020 16:26:52 -0700 (PDT) From: "Basil L. Contovounesios" To: bug-gnu-emacs@gnu.org Subject: 27.0.91; Various D-Bus cleanups Date: Sun, 07 Jun 2020 00:26:50 +0100 Message-ID: <87mu5fpyh1.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=2a00:1450:4864:20::42f; envelope-from=contovob@tcd.ie; helo=mail-wr1-x42f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" --=-=-= Content-Type: text/plain X-Debbugs-Cc: Michael Albinus Severity: minor Tags: patch While reading through the D-Bus manual and implementation, I noticed some opportunities for small cleanups. I propose these documentation cleanups for emacs-27: --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-Clean-up-D-Bus-documentation.patch Content-Transfer-Encoding: quoted-printable >From 962f2af23a0d71638e14bb143de866862d51d0d2 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sat, 6 Jun 2020 00:58:37 +0100 Subject: [PATCH] Clean up D-Bus documentation * doc/lispref/errors.texi (Standard Errors): The error symbol dbus-error is defined even when Emacs is built without D-Bus. * doc/misc/dbus.texi (Bus Names, Introspection) (Nodes and Interfaces, Methods and Signal) (Properties and Annotations, Arguments and Signatures) (Synchronous Methods, Receiving Method Calls, Signals) (Alternative Buses, Errors and Events): Clarify wording. Fix indentation of and simplify examples where possible. Improve Texinfo markup and cross-referencing where possible. (Type Conversion): Ditto. Remove mentions of Emacs' fixnum range now that we have bignums. * lisp/net/dbus.el (dbus-return-values-table) (dbus-call-method-asynchronously, dbus-send-signal) (dbus-register-signal, dbus-register-method) (dbus-string-to-byte-array, dbus-byte-array-to-string) (dbus-escape-as-identifier, dbus-check-event, dbus-event-bus-name) (dbus-event-message-type, dbus-event-serial-number) (dbus-event-service-name, dbus-event-path-name) (dbus-event-interface-name, dbus-event-member-name) (dbus-list-activatable-names, dbus-list-queued-owners, dbus-ping) (dbus-introspect-get-interface-names, dbus-introspect-get-interface) (dbus-introspect-get-method, dbus-introspect-get-signal) (dbus-introspect-get-property, dbus-introspect-get-annotation-names) (dbus-introspect-get-annotation, dbus-introspect-get-argument-names) (dbus-introspect-get-argument, dbus-introspect-get-signature) (dbus-set-property, dbus-register-property) (dbus-get-all-managed-objects, dbus-init-bus): Clarify docstring and improve formatting where possible. (dbus-call-method): Ditto. Remove mentions of Emacs' fixnum range now that we have bignums. --- doc/lispref/errors.texi | 5 +- doc/misc/dbus.texi | 795 ++++++++++++++++++++-------------------- lisp/net/dbus.el | 228 ++++++------ 3 files changed, 511 insertions(+), 517 deletions(-) diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index dc6877c9ec..cd8694be8a 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi @@ -79,9 +79,8 @@ Standard Errors a loop}. @xref{Variable Aliases}. =20 @item dbus-error -The message is @samp{D-Bus error}. This is only defined if Emacs was -compiled with D-Bus support. @xref{Errors and Events,,, dbus, D-Bus -integration in Emacs}. +The message is @samp{D-Bus error}. @xref{Errors and Events,,, dbus, +D-Bus integration in Emacs}. =20 @item end-of-buffer The message is @samp{End of buffer}. @xref{Character Motion}. diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi index 9e5f1ccc6f..eaf77ffa8f 100644 --- a/doc/misc/dbus.texi +++ b/doc/misc/dbus.texi @@ -167,7 +167,7 @@ Bus names described in a service registration file. Under GNU/Linux, such files are located at @file{/usr/share/dbus-1/system-services/} (for the @code{:system} bus) or @file{/usr/share/dbus-1/services/}. An -activatable service is not necessarily registered at @var{bus} at already. +activatable service is not necessarily registered at @var{bus} already. =20 The result is a list of strings, which is @code{nil} when there are no activatable service names at all. Example: @@ -180,8 +180,8 @@ Bus names @end defun =20 @defun dbus-list-names bus -All service names, which are registered at D-Bus @var{bus}, are -returned. The result is a list of strings, which is @code{nil} when +This function returns all service names, which are registered at D-Bus +@var{bus}. The result is a list of strings, which is @code{nil} when there are no registered service names at all. Well known names are strings like @samp{org.freedesktop.DBus}. Names starting with @samp{:} are unique names for services. @@ -191,10 +191,10 @@ Bus names @end defun =20 @defun dbus-list-known-names bus -Retrieves all registered services which correspond to a known name in @var= {bus}. -A service has a known name if it doesn't start with @samp{:}. The -result is a list of strings, which is @code{nil} when there are no -known names at all. +This function retrieves all registered services which correspond to a +known name in @var{bus}. A service has a known name if it doesn't +start with @samp{:}. The result is a list of strings, which is +@code{nil} when there are no known names at all. =20 @var{bus} must be either the symbol @code{:system} or the symbol @code{:session}. @@ -202,9 +202,9 @@ Bus names =20 @defun dbus-list-queued-owners bus service For a given service, registered at D-Bus @var{bus} under the name -@var{service}, all queued unique names are returned. The result is a -list of strings, or @code{nil} when there are no queued names for -@var{service} at all. +@var{service}, this function returns all queued unique names. The +result is a list of strings, or @code{nil} when there are no queued +names for @var{service} at all. =20 @var{bus} must be either the symbol @code{:system} or the symbol @code{:session}. @var{service} must be a known service name as @@ -213,9 +213,9 @@ Bus names =20 @defun dbus-get-name-owner bus service For a given service, registered at D-Bus @var{bus} under the name -@var{service}, the unique name of the name owner is returned. The -result is a string, or @code{nil} when there exist no name owner of -@var{service}. +@var{service}, this function returns the unique name of the name +owner. The result is a string, or @code{nil} when there is no name +owner of @var{service}. =20 @var{bus} must be either the symbol @code{:system} or the symbol @code{:session}. @var{service} must be a known service name as @@ -223,26 +223,28 @@ Bus names @end defun =20 @defun dbus-ping bus service &optional timeout -Check whether the service name @var{service} is registered at D-Bus -@var{bus}. @var{service} might not have been started yet, it is -autostarted if possible. The result is either @code{t} or @code{nil}. +This function checks whether the service name @var{service} is +registered at D-Bus @var{bus}. If @var{service} has not yet started, +it is autostarted if possible. The result is either @code{t} or +@code{nil}. =20 @var{bus} must be either the symbol @code{:system} or the symbol @code{:session}. @var{service} must be a string. @var{timeout}, a nonnegative integer, specifies the maximum number of milliseconds -@code{dbus-ping} must return. The default value is 25,000. Example: +before @code{dbus-ping} must return. The default value is 25,000. +Example: =20 @lisp (message - "%s screensaver on board." - (cond - ((dbus-ping :session "org.gnome.ScreenSaver" 100) "Gnome") - ((dbus-ping :session "org.freedesktop.ScreenSaver" 100) "KDE") - (t "No"))) + "%s screensaver on board." + (cond + ((dbus-ping :session "org.gnome.ScreenSaver" 100) "Gnome") + ((dbus-ping :session "org.freedesktop.ScreenSaver" 100) "KDE") + (t "No"))) @end lisp =20 -If it shall be checked whether @var{service} is already running -without autostarting it, one shall apply +To check whether @var{service} is already running without autostarting +it, you can instead write: =20 @lisp (member service (dbus-list-known-names bus)) @@ -250,8 +252,9 @@ Bus names @end defun =20 @defun dbus-get-unique-name bus -The unique name, under which Emacs is registered at D-Bus @var{bus}, -is returned as string. +@anchor{dbus-get-unique-name} +This function returns the unique name, under which Emacs is registered +at D-Bus @var{bus}, as a string. =20 @var{bus} must be either the symbol @code{:system} or the symbol @code{:session}. @@ -380,8 +383,8 @@ Introspection =20 @lisp (dbus-introspect - :system "org.freedesktop.Hal" - "/org/freedesktop/Hal/devices/computer") + :system "org.freedesktop.Hal" + "/org/freedesktop/Hal/devices/computer") =20 @result{} " t or nil - DBUS_TYPE_BYTE =3D> number - DBUS_TYPE_UINT16 =3D> number + DBUS_TYPE_BYTE =3D> natural number + DBUS_TYPE_UINT16 =3D> natural number DBUS_TYPE_INT16 =3D> integer - DBUS_TYPE_UINT32 =3D> number or float - DBUS_TYPE_UNIX_FD =3D> number or float - DBUS_TYPE_INT32 =3D> integer or float - DBUS_TYPE_UINT64 =3D> number or float - DBUS_TYPE_INT64 =3D> integer or float + DBUS_TYPE_UINT32 =3D> natural number + DBUS_TYPE_UNIX_FD =3D> natural number + DBUS_TYPE_INT32 =3D> integer + DBUS_TYPE_UINT64 =3D> natural number + DBUS_TYPE_INT64 =3D> integer DBUS_TYPE_DOUBLE =3D> float DBUS_TYPE_STRING =3D> string DBUS_TYPE_OBJECT_PATH =3D> string @@ -268,9 +268,9 @@ dbus-call-method Example: =20 \(dbus-call-method - :session \"org.gnome.seahorse\" \"/org/gnome/seahorse/keys/openpgp\" - \"org.gnome.seahorse.Keys\" \"GetKeyField\" - \"openpgp:657984B8C7A966DD\" \"simple-name\") + :session \"org.gnome.seahorse\" \"/org/gnome/seahorse/keys/openpgp\" + \"org.gnome.seahorse.Keys\" \"GetKeyField\" + \"openpgp:657984B8C7A966DD\" \"simple-name\") =20 =3D> (t (\"Philip R. Zimmermann\")) =20 @@ -278,9 +278,9 @@ dbus-call-method object is returned instead of a list containing this single Lisp object. =20 \(dbus-call-method - :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" - \"org.freedesktop.Hal.Device\" \"GetPropertyString\" - \"system.kernel.machine\") + :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" + \"org.freedesktop.Hal.Device\" \"GetPropertyString\" + \"system.kernel.machine\") =20 =3D> \"i686\"" =20 @@ -357,10 +357,10 @@ dbus-call-method-asynchronously return message has arrived. If HANDLER is nil, no return message will be expected. =20 -If the parameter `:timeout' is given, the following integer TIMEOUT -specifies the maximum number of milliseconds the method call must -return. The default value is 25,000. If the method call doesn't -return in time, a D-Bus error is raised. +If the parameter `:timeout' is given, the following integer +TIMEOUT specifies the maximum number of milliseconds before the +method call must return. The default value is 25,000. If the +method call doesn't return in time, a D-Bus error is raised. =20 All other arguments ARGS are passed to METHOD as arguments. They are converted into D-Bus types via the following rules: @@ -377,19 +377,19 @@ dbus-call-method-asynchronously =20 If HANDLER is a Lisp function, the function returns a key into the hash table `dbus-registered-objects-table'. The corresponding entry -in the hash table is removed, when the return message has been arrived, +in the hash table is removed, when the return message arrives, and HANDLER is called. =20 Example: =20 \(dbus-call-method-asynchronously - :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" - \"org.freedesktop.Hal.Device\" \"GetPropertyString\" \\=3D'message - \"system.kernel.machine\") + :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" + \"org.freedesktop.Hal.Device\" \"GetPropertyString\" \\=3D'message + \"system.kernel.machine\") =20 - =3D> (:serial :system 2) + -| i686 =20 - -| i686" + =3D> (:serial :system 2)" =20 (or (featurep 'dbusbind) (signal 'dbus-error (list "Emacs not compiled with dbus support"))) @@ -438,8 +438,8 @@ dbus-send-signal Example: =20 \(dbus-send-signal - :session nil \"/org/gnu/Emacs\" \"org.gnu.Emacs.FileManager\" - \"FileModified\" \"/home/albinus/.emacs\")" + :session nil \"/org/gnu/Emacs\" \"org.gnu.Emacs.FileManager\" + \"FileModified\" \"/home/albinus/.emacs\")" =20 (or (featurep 'dbusbind) (signal 'dbus-error (list "Emacs not compiled with dbus support"))) @@ -625,17 +625,17 @@ dbus-register-signal It can be either a known name or the unique name of the D-Bus object sending the signal. =20 -PATH is the D-Bus object path SERVICE is registered. INTERFACE -is an interface offered by SERVICE. It must provide SIGNAL. -HANDLER is a Lisp function to be called when the signal is -received. It must accept as arguments the values SIGNAL is +PATH is the D-Bus object path SERVICE is registered at. +INTERFACE is an interface offered by SERVICE. It must provide +SIGNAL. HANDLER is a Lisp function to be called when the signal +is received. It must accept as arguments the values SIGNAL is sending. =20 SERVICE, PATH, INTERFACE and SIGNAL can be nil. This is interpreted as a wildcard for the respective argument. =20 The remaining arguments ARGS can be keywords or keyword string pairs. -The meaning is as follows: +Their meaning is as follows: =20 `:argN' STRING: `:pathN' STRING: This stands for the Nth argument of the @@ -643,8 +643,9 @@ dbus-register-signal matches as specified by D-Bus, while an `:argN' argument requires an exact match. =20 -`:arg-namespace' STRING: Register for the signals, which first -argument defines the service or interface namespace STRING. +`:arg-namespace' STRING: Register for those signals, whose first +argument names a service or interface within the namespace +STRING. =20 `:path-namespace' STRING: Register for the object path namespace STRING. All signals sent from an object path, which has STRING as @@ -660,8 +661,8 @@ dbus-register-signal (message \"Device %s added\" device)) =20 \(dbus-register-signal - :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" - \"org.freedesktop.Hal.Manager\" \"DeviceAdded\" \\=3D'my-signal-handler) + :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" + \"org.freedesktop.Hal.Manager\" \"DeviceAdded\" \\=3D'my-signal-handler) =20 =3D> ((:signal :system \"org.freedesktop.Hal.Manager\" \"DeviceAdded\") (\"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" my-signal-= handler)) @@ -773,24 +774,24 @@ dbus-register-signal =20 (defun dbus-register-method (bus service path interface method handler &optional dont-register-servi= ce) - "Register for method METHOD on the D-Bus BUS. + "Register METHOD on the D-Bus BUS. =20 BUS is either a Lisp symbol, `:system' or `:session', or a string denoting the bus address. =20 SERVICE is the D-Bus service name of the D-Bus object METHOD is -registered for. It must be a known name (See discussion of +registered for. It must be a known name (see discussion of DONT-REGISTER-SERVICE below). =20 -PATH is the D-Bus object path SERVICE is registered (See discussion of -DONT-REGISTER-SERVICE below). INTERFACE is the interface offered by -SERVICE. It must provide METHOD. +PATH is the D-Bus object path SERVICE is registered at (see +discussion of DONT-REGISTER-SERVICE below). INTERFACE is the +interface offered by SERVICE. It must provide METHOD. =20 HANDLER is a Lisp function to be called when a method call is received. It must accept the input arguments of METHOD. The return value of HANDLER is used for composing the returning D-Bus message. -In case HANDLER shall return a reply message with an empty argument -list, HANDLER must return the symbol `:ignore'. +If HANDLER returns a reply message with an empty argument list, +HANDLER must return the symbol `:ignore'. =20 When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is not registered. This means that other D-Bus clients have no way of @@ -888,8 +889,8 @@ dbus-unregister-object ;;; D-Bus type conversion. =20 (defun dbus-string-to-byte-array (string) - "Transform STRING to list (:array :byte c1 :byte c2 ...). -STRING shall be UTF8 coded." + "Transform STRING to list (:array :byte C1 :byte C2 ...). +STRING shall be UTF-8 coded." (if (zerop (length string)) '(:array :signature "y") (let (result) @@ -897,7 +898,7 @@ dbus-string-to-byte-array (setq result (append result (list :byte elt))))))) =20 (defun dbus-byte-array-to-string (byte-array &optional multibyte) - "Transform BYTE-ARRAY into UTF8 coded string. + "Transform BYTE-ARRAY into UTF-8 coded string. BYTE-ARRAY must be a list of structure (c1 c2 ...), or a byte array as produced by `dbus-string-to-byte-array'. The resulting string is unibyte encoded, unless MULTIBYTE is non-nil." @@ -920,9 +921,9 @@ dbus-escape-as-identifier =20 \"0123abc_xyz\\x01\\xff\" -> \"_30123abc_5fxyz_01_ff\" =20 -i.e. similar to URI encoding, but with \"_\" taking the role of \"%\", -and a smaller allowed set. As a special case, \"\" is escaped to -\"_\". +i.e. similar to URI encoding, but with \"_\" taking the role of +\"%\", and a smaller allowed set. As a special case, \"\" is +escaped to \"_\". =20 Returns the escaped string. Algorithm taken from telepathy-glib's `tp_escape_as_identifier'." @@ -963,8 +964,8 @@ dbus-check-event are the arguments passed to HANDLER, when it is called during event handling in `dbus-handle-event'. =20 -This function raises a `dbus-error' signal in case the event is -not well formed." +This function signals a `dbus-error' if the event is not well +formed." (when dbus-debug (message "DBus-Event %s" event)) (unless (and (listp event) (eq (car event) 'dbus-event) @@ -1038,16 +1039,16 @@ dbus-event-bus-name "Return the bus name the event is coming from. The result is either a Lisp symbol, `:system' or `:session', or a string denoting the bus address. EVENT is a D-Bus event, see -`dbus-check-event'. This function raises a `dbus-error' signal -in case the event is not well formed." +`dbus-check-event'. This function signals a `dbus-error' if the +event is not well formed." (dbus-check-event event) (nth 1 event)) =20 (defun dbus-event-message-type (event) "Return the message type of the corresponding D-Bus message. The result is a number. EVENT is a D-Bus event, see -`dbus-check-event'. This function raises a `dbus-error' signal -in case the event is not well formed." +`dbus-check-event'. This function signals a `dbus-error' if the +event is not well formed." (dbus-check-event event) (nth 2 event)) =20 @@ -1055,41 +1056,40 @@ dbus-event-serial-number "Return the serial number of the corresponding D-Bus message. The result is a number. The serial number is needed for generating a reply message. EVENT is a D-Bus event, see -`dbus-check-event'. This function raises a `dbus-error' signal -in case the event is not well formed." +`dbus-check-event'. This function signals a `dbus-error' if the +event is not well formed." (dbus-check-event event) (nth 3 event)) =20 (defun dbus-event-service-name (event) "Return the name of the D-Bus object the event is coming from. The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. -This function raises a `dbus-error' signal in case the event is -not well formed." +This function signals a `dbus-error' if the event is not well +formed." (dbus-check-event event) (nth 4 event)) =20 (defun dbus-event-path-name (event) "Return the object path of the D-Bus object the event is coming from. The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. -This function raises a `dbus-error' signal in case the event is -not well formed." +This function signals a `dbus-error' if the event is not well +formed." (dbus-check-event event) (nth 5 event)) =20 (defun dbus-event-interface-name (event) "Return the interface name of the D-Bus object the event is coming from. The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. -This function raises a `dbus-error' signal in case the event is -not well formed." +This function signals a `dbus-error' if the event is not well +formed." (dbus-check-event event) (nth 6 event)) =20 (defun dbus-event-member-name (event) "Return the member name the event is coming from. -It is either a signal name or a method name. The result is a +It is either a signal name or a method name. The result is a string. EVENT is a D-Bus event, see `dbus-check-event'. This -function raises a `dbus-error' signal in case the event is not -well formed." +function signals a `dbus-error' if the event is not well formed." (dbus-check-event event) (nth 7 event)) =20 @@ -1097,10 +1097,10 @@ dbus-event-member-name ;;; D-Bus registered names. =20 (defun dbus-list-activatable-names (&optional bus) - "Return the D-Bus service names which can be activated as list. -If BUS is left nil, `:system' is assumed. The result is a list -of strings, which is nil when there are no activatable service -names at all." + "Return a list of the D-Bus service names which can be activated. +BUS defaults to `:system' when nil or omitted. The result is a +list of strings, which is nil when there are no activatable +service names at all." (dbus-ignore-errors (dbus-call-method (or bus :system) dbus-service-dbus @@ -1126,8 +1126,8 @@ dbus-list-known-names =20 (defun dbus-list-queued-owners (bus service) "Return the unique names registered at D-Bus BUS and queued for SERVICE. -The result is a list of strings, or nil when there are no -queued name owners service names at all." +The result is a list of strings, or nil when there are no queued +name owner service names at all." (dbus-ignore-errors (dbus-call-method bus dbus-service-dbus dbus-path-dbus @@ -1144,13 +1144,13 @@ dbus-get-name-owner (defun dbus-ping (bus service &optional timeout) "Check whether SERVICE is registered for D-Bus BUS. TIMEOUT, a nonnegative integer, specifies the maximum number of -milliseconds `dbus-ping' must return. The default value is 25,000. +milliseconds before `dbus-ping' must return. The default value +is 25,000. =20 -Note, that this autoloads SERVICE if it is not running yet. If -it shall be checked whether SERVICE is already running, one shall -apply +Note, that this autoloads SERVICE if it is not running yet. To +check whether SERVICE is already running, you can instead write =20 - (member service \(dbus-list-known-names bus))" + (member service (dbus-list-known-names bus))" ;; "Ping" raises a D-Bus error if SERVICE does not exist. ;; Otherwise, it returns silently with nil. (condition-case nil @@ -1239,11 +1239,11 @@ dbus-introspect-get-interface-names "Return all interface names of SERVICE in D-Bus BUS at object path PATH. It returns a list of strings. =20 -There will be always the default interface -\"org.freedesktop.DBus.Introspectable\". Another default -interface is \"org.freedesktop.DBus.Properties\". If present, -\"interface\" objects can also have \"property\" objects as -children, beside \"method\" and \"signal\" objects." +The default interface \"org.freedesktop.DBus.Introspectable\" is +always present. Another default interface is +\"org.freedesktop.DBus.Properties\". If present, \"interface\" +objects can also have \"property\" objects as children, beside +\"method\" and \"signal\" objects." (let ((object (dbus-introspect-xml bus service path)) result) (dolist (elt (xml-get-children object 'interface) (nreverse result)) @@ -1251,9 +1251,10 @@ dbus-introspect-get-interface-names =20 (defun dbus-introspect-get-interface (bus service path interface) "Return the INTERFACE of SERVICE in D-Bus BUS at object path PATH. -The return value is an XML object. INTERFACE must be a string, -element of the list returned by `dbus-introspect-get-interface-names'. -The resulting \"interface\" object can contain \"method\", \"signal\", +The return value is an XML object. INTERFACE must be a string +and a member of the list returned by +`dbus-introspect-get-interface-names'. The resulting +\"interface\" object can contain \"method\", \"signal\", \"property\" and \"annotation\" children." (let ((elt (xml-get-children (dbus-introspect-xml bus service path) 'interface))) @@ -1273,9 +1274,9 @@ dbus-introspect-get-method-names (push (dbus-introspect-get-attribute elt "name") result)))) =20 (defun dbus-introspect-get-method (bus service path interface method) - "Return method METHOD of interface INTERFACE as XML object. + "Return method METHOD of interface INTERFACE as an XML object. It must be located at SERVICE in D-Bus BUS at object path PATH. -METHOD must be a string, element of the list returned by +METHOD must be a string and a member of the list returned by `dbus-introspect-get-method-names'. The resulting \"method\" object can contain \"arg\" and \"annotation\" children." (let ((elt (xml-get-children @@ -1296,7 +1297,7 @@ dbus-introspect-get-signal-names (push (dbus-introspect-get-attribute elt "name") result)))) =20 (defun dbus-introspect-get-signal (bus service path interface signal) - "Return signal SIGNAL of interface INTERFACE as XML object. + "Return signal SIGNAL of interface INTERFACE as an XML object. It must be located at SERVICE in D-Bus BUS at object path PATH. SIGNAL must be a string, element of the list returned by `dbus-introspect-get-signal-names'. The resulting \"signal\" @@ -1319,9 +1320,9 @@ dbus-introspect-get-property-names (push (dbus-introspect-get-attribute elt "name") result)))) =20 (defun dbus-introspect-get-property (bus service path interface property) - "Return PROPERTY of INTERFACE as XML object. + "Return PROPERTY of INTERFACE as an XML object. It must be located at SERVICE in D-Bus BUS at object path PATH. -PROPERTY must be a string, element of the list returned by +PROPERTY must be a string and a member of the list returned by `dbus-introspect-get-property-names'. The resulting PROPERTY object can contain \"annotation\" children." (let ((elt (xml-get-children @@ -1336,7 +1337,7 @@ dbus-introspect-get-property =20 (defun dbus-introspect-get-annotation-names (bus service path interface &optional name) - "Return all annotation names as list of strings. + "Return all annotation names as a list of strings. If NAME is nil, the annotations are children of INTERFACE, otherwise NAME must be a \"method\", \"signal\", or \"property\" object, where the annotations belong to." @@ -1352,7 +1353,7 @@ dbus-introspect-get-annotation-names =20 (defun dbus-introspect-get-annotation (bus service path interface name annotation) - "Return ANNOTATION as XML object. + "Return ANNOTATION as an XML object. If NAME is nil, ANNOTATION is a child of INTERFACE, otherwise NAME must be the name of a \"method\", \"signal\", or \"property\" object, where the ANNOTATION belongs to." @@ -1374,7 +1375,7 @@ dbus-introspect-get-annotation (car elt))) =20 (defun dbus-introspect-get-argument-names (bus service path interface name) - "Return a list of all argument names as list of strings. + "Return a list of all argument names as a list of strings. NAME must be a \"method\" or \"signal\" object. =20 Argument names are optional, the function can return nil @@ -1388,8 +1389,9 @@ dbus-introspect-get-argument-names =20 (defun dbus-introspect-get-argument (bus service path interface name arg) "Return argument ARG as XML object. -NAME must be a \"method\" or \"signal\" object. ARG must be a string, -element of the list returned by `dbus-introspect-get-argument-names'." +NAME must be a \"method\" or \"signal\" object. ARG must be a +string and a member of the list returned by +`dbus-introspect-get-argument-names'." (let ((elt (xml-get-children (or (dbus-introspect-get-method bus service path interface name) (dbus-introspect-get-signal bus service path interface name)) @@ -1402,7 +1404,7 @@ dbus-introspect-get-argument =20 (defun dbus-introspect-get-signature (bus service path interface name &optional direction) - "Return signature of a `method' or `signal', represented by NAME, as str= ing. + "Return signature of a `method' or `signal' represented by NAME as a str= ing. If NAME is a `method', DIRECTION can be either \"in\" or \"out\". If DIRECTION is nil, \"in\" is assumed. =20 @@ -1450,9 +1452,8 @@ dbus-get-property =20 (defun dbus-set-property (bus service path interface property value) "Set value of PROPERTY of INTERFACE to VALUE. -It will be checked at BUS, SERVICE, PATH. When the value has -been set successful, the result is VALUE. Otherwise, nil is -returned." +It will be checked at BUS, SERVICE, PATH. When the value is +successfully set return VALUE. Otherwise, return nil." (dbus-ignore-errors ;; "Set" requires a variant. (dbus-call-method @@ -1479,15 +1480,15 @@ dbus-get-all-properties (defun dbus-register-property (bus service path interface property access value &optional emits-signal dont-register-service) - "Register property PROPERTY on the D-Bus BUS. + "Register PROPERTY on the D-Bus BUS. =20 BUS is either a Lisp symbol, `:system' or `:session', or a string denoting the bus address. =20 SERVICE is the D-Bus service name of the D-Bus. It must be a -known name (See discussion of DONT-REGISTER-SERVICE below). +known name (see discussion of DONT-REGISTER-SERVICE below). =20 -PATH is the D-Bus object path SERVICE is registered (See +PATH is the D-Bus object path SERVICE is registered at (see discussion of DONT-REGISTER-SERVICE below). INTERFACE is the name of the interface used at PATH, PROPERTY is the name of the property of INTERFACE. ACCESS indicates, whether the property @@ -1625,8 +1626,8 @@ dbus-get-all-managed-objects "Return all objects at BUS, SERVICE, PATH, and the children of PATH. The result is a list of objects. Every object is a cons of an existing path name, and the list of available interface objects. -An interface object is another cons, which car is the interface -name, and the cdr is the list of properties as returned by +An interface object is another cons, whose car is the interface +name and cdr is the list of properties as returned by `dbus-get-all-properties' for that path and interface. Example: =20 \(dbus-get-all-managed-objects :session \"org.gnome.SettingsDaemon\" \"/\") @@ -1782,12 +1783,13 @@ dbus-init-bus the system and session buses, this function is called when loading `dbus.el', there is no need to call it again. =20 -The function returns a number, which counts the connections this Emacs -session has established to the BUS under the same unique name (see -`dbus-get-unique-name'). It depends on the libraries Emacs is linked -with, and on the environment Emacs is running. For example, if Emacs -is linked with the gtk toolkit, and it runs in a GTK-aware environment -like Gnome, another connection might already be established. +The function returns the number of connections this Emacs session +has established to the BUS under the same unique name (see +`dbus-get-unique-name'). It depends on the libraries Emacs is +linked with, and on the environment Emacs is running. For +example, if Emacs is linked with the GTK+ toolkit, and it runs in +a GTK+-aware environment like GNOME, another connection might +already be established. =20 When PRIVATE is non-nil, a new connection is established instead of reusing an existing one. It results in a new unique name at the bus. --=20 2.26.2 --=-=-= Content-Type: text/plain And these implementation cleanups for master: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Various-dbus.el-cleanups.patch >From dad68bc11e6b0a64a733029804f88e0f18a5401c Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sat, 6 Jun 2020 13:20:06 +0100 Subject: [PATCH] Various dbus.el cleanups * lisp/net/dbus.el: Remove unneeded dependency on cl-lib.el. Quote function symbols as such. (dbus-ignore-errors): Don't add macro name to font-lock keywords, as emacs-lisp-mode now dynamically fontifies new macro definitions. (dbus-call-method-non-blocking): Define as obosolete alias using define-obsolete-function-alias. (dbus-register-signal, dbus-escape-as-identifier): Simplify. Use regexp \` and \' in place of ^ and $. (dbus--parse-xml-buffer): New function for libxml2 compatibility. (dbus-introspect-xml): Use it. (dbus-string-to-byte-array, dbus-byte-array-to-string) (dbus-unescape-from-identifier, dbus-list-known-names) (dbus-introspect-get-all-nodes, dbus-get-all-properties) (dbus-get-all-managed-objects): Simplify. (dbus--introspect-names, dbus--introspect-name): New convenience functions. (dbus-introspect-get-node-names) (dbus-introspect-get-interface-names) (dbus-introspect-get-interface, dbus-introspect-get-method-names) (dbus-introspect-get-method, dbus-introspect-get-signal-names) (dbus-introspect-get-signal, dbus-introspect-get-property-names) (dbus-introspect-get-property) (dbus-introspect-get-annotation-names) (dbus-introspect-get-annotation) (dbus-introspect-get-argument-names, dbus-introspect-get-argument): Use them to DRY. * test/lisp/net/dbus-tests.el (dbus-test-all): Quote function symbols as such. --- lisp/net/dbus.el | 269 +++++++++++++++--------------------- test/lisp/net/dbus-tests.el | 4 +- 2 files changed, 111 insertions(+), 162 deletions(-) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 4538399c75..c882d1ae7a 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -51,9 +51,6 @@ dbus-registered-objects-table (unless (boundp 'dbus-debug) (defvar dbus-debug nil)) -;; Pacify byte compiler. -(eval-when-compile (require 'cl-lib)) - (require 'xml) (defconst dbus-service-dbus "org.freedesktop.DBus" @@ -169,7 +166,6 @@ dbus-ignore-errors `(condition-case err (progn ,@body) (dbus-error (when dbus-debug (signal (car err) (cdr err)))))) -(font-lock-add-keywords 'emacs-lisp-mode '("\\")) (define-obsolete-variable-alias 'dbus-event-error-hooks 'dbus-event-error-functions "24.3") @@ -181,7 +177,7 @@ dbus-event-error-functions ;;; Basic D-Bus message functions. -(defvar dbus-return-values-table (make-hash-table :test 'equal) +(defvar dbus-return-values-table (make-hash-table :test #'equal) "Hash table for temporary storing arguments of reply messages. A key in this hash table is a list (:serial BUS SERIAL), like in `dbus-registered-objects-table'. BUS is either a Lisp symbol, @@ -301,8 +297,8 @@ dbus-call-method (check-interval 0.001) (key (apply - 'dbus-message-internal dbus-message-type-method-call - bus service path interface method 'dbus-call-method-handler args)) + #'dbus-message-internal dbus-message-type-method-call + bus service path interface method #'dbus-call-method-handler args)) (result (cons :pending nil))) ;; Wait until `dbus-call-method-handler' has put the result into @@ -339,8 +335,8 @@ dbus-call-method (remhash key dbus-return-values-table)))) ;; `dbus-call-method' works non-blocking now. -(defalias 'dbus-call-method-non-blocking 'dbus-call-method) -(make-obsolete 'dbus-call-method-non-blocking 'dbus-call-method "24.3") +(define-obsolete-function-alias 'dbus-call-method-non-blocking + #'dbus-call-method "24.3") (defun dbus-call-method-asynchronously (bus service path interface method handler &rest args) @@ -406,7 +402,7 @@ dbus-call-method-asynchronously (or (null handler) (functionp handler) (signal 'wrong-type-argument (list 'functionp handler))) - (apply 'dbus-message-internal dbus-message-type-method-call + (apply #'dbus-message-internal dbus-message-type-method-call bus service path interface method handler args)) (defun dbus-send-signal (bus service path interface signal &rest args) @@ -454,7 +450,7 @@ dbus-send-signal (or (stringp signal) (signal 'wrong-type-argument (list 'stringp signal))) - (apply 'dbus-message-internal dbus-message-type-signal + (apply #'dbus-message-internal dbus-message-type-signal bus service path interface signal args)) (defun dbus-method-return-internal (bus service serial &rest args) @@ -470,7 +466,7 @@ dbus-method-return-internal (or (natnump serial) (signal 'wrong-type-argument (list 'natnump serial))) - (apply 'dbus-message-internal dbus-message-type-method-return + (apply #'dbus-message-internal dbus-message-type-method-return bus service serial args)) (defun dbus-method-error-internal (bus service serial &rest args) @@ -486,7 +482,7 @@ dbus-method-error-internal (or (natnump serial) (signal 'wrong-type-argument (list 'natnump serial))) - (apply 'dbus-message-internal dbus-message-type-error + (apply #'dbus-message-internal dbus-message-type-error bus service serial args)) @@ -552,13 +548,13 @@ dbus-register-service `:already-owner': Service is already the primary owner." ;; Add Peer handler. - (dbus-register-method - bus service nil dbus-interface-peer "Ping" 'dbus-peer-handler 'dont-register) + (dbus-register-method bus service nil dbus-interface-peer "Ping" + #'dbus-peer-handler 'dont-register) ;; Add ObjectManager handler. (dbus-register-method bus service nil dbus-interface-objectmanager "GetManagedObjects" - 'dbus-managed-objects-handler 'dont-register) + #'dbus-managed-objects-handler 'dont-register) (let ((arg 0) reply) @@ -680,7 +676,7 @@ dbus-register-signal (if (and (stringp service) (not (zerop (length service))) (not (string-equal service dbus-service-dbus)) - (not (string-match "^:" service))) + (/= (string-to-char service) ?:)) (setq uname (dbus-get-name-owner bus service)) (setq uname service)) @@ -709,7 +705,7 @@ dbus-register-signal ;; `:arg0' .. `:arg63', `:path0' .. `:path63'. ((and (keywordp key) (string-match - "^:\\(arg\\|path\\)\\([[:digit:]]+\\)$" + "\\`:\\(arg\\|path\\)\\([[:digit:]]+\\)\\'" (symbol-name key))) (setq counter (match-string 2 (symbol-name key)) args (cdr args) @@ -725,9 +721,7 @@ dbus-register-signal "path" "") value)) ;; `:arg-namespace', `:path-namespace'. - ((and (keywordp key) - (string-match - "^:\\(arg\\|path\\)-namespace$" (symbol-name key))) + ((memq key '(:arg-namespace :path-namespace)) (setq args (cdr args) value (car args)) (unless (stringp value) @@ -735,8 +729,7 @@ dbus-register-signal (list "Wrong argument" key value))) (format ",%s='%s'" - (if (string-equal (match-string 1 (symbol-name key)) "path") - "path_namespace" "arg0namespace") + (if (eq key :path-namespace) "path_namespace" "arg0namespace") value)) ;; `:eavesdrop'. ((eq key :eavesdrop) @@ -750,11 +743,11 @@ dbus-register-signal bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus "AddMatch" rule) (dbus-error - (if (not (string-match "eavesdrop" rule)) + (if (not (string-match-p "eavesdrop" rule)) (signal (car err) (cdr err)) ;; The D-Bus spec says we shall fall back to a rule without eavesdrop. (when dbus-debug (message "Removing eavesdrop from rule %s" rule)) - (setq rule (replace-regexp-in-string ",eavesdrop='true'" "" rule)) + (setq rule (replace-regexp-in-string ",eavesdrop='true'" "" rule t t)) (dbus-call-method bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus "AddMatch" rule)))) @@ -892,9 +885,7 @@ dbus-string-to-byte-array STRING shall be UTF8 coded." (if (zerop (length string)) '(:array :signature "y") - (let (result) - (dolist (elt (string-to-list string) (append '(:array) result)) - (setq result (append result (list :byte elt))))))) + (cons :array (mapcan (lambda (c) (list :byte c)) string)))) (defun dbus-byte-array-to-string (byte-array &optional multibyte) "Transform BYTE-ARRAY into UTF8 coded string. @@ -902,12 +893,9 @@ dbus-byte-array-to-string array as produced by `dbus-string-to-byte-array'. The resulting string is unibyte encoded, unless MULTIBYTE is non-nil." (apply - (if multibyte 'string 'unibyte-string) - (if (equal byte-array '(:array :signature "y")) - nil - (let (result) - (dolist (elt byte-array result) - (when (characterp elt) (setq result (append result `(,elt))))))))) + (if multibyte #'string #'unibyte-string) + (unless (equal byte-array '(:array :signature "y")) + (seq-filter #'characterp byte-array)))) (defun dbus-escape-as-identifier (string) "Escape an arbitrary STRING so it follows the rules for a C identifier. @@ -929,9 +917,9 @@ dbus-escape-as-identifier (if (zerop (length string)) "_" (replace-regexp-in-string - "^[0-9]\\|[^A-Za-z0-9]" + "\\`[0-9]\\|[^A-Za-z0-9]" (lambda (x) (format "_%2x" (aref x 0))) - string))) + string nil t))) (defun dbus-unescape-from-identifier (string) "Retrieve the original string from the encoded STRING as unibyte string. @@ -941,7 +929,7 @@ dbus-unescape-from-identifier (replace-regexp-in-string "_.." (lambda (x) (byte-to-string (string-to-number (substring x 1) 16))) - string))) + string nil t))) ;;; D-Bus events. @@ -1019,7 +1007,7 @@ dbus-handle-event (if (eq result :ignore) (dbus-method-return-internal (nth 1 event) (nth 4 event) (nth 3 event)) - (apply 'dbus-method-return-internal + (apply #'dbus-method-return-internal (nth 1 event) (nth 4 event) (nth 3 event) (if (consp result) result (list result))))))) ;; Error handling. @@ -1119,10 +1107,9 @@ dbus-list-names (defun dbus-list-known-names (bus) "Retrieve all services which correspond to a known name in BUS. A service has a known name if it doesn't start with \":\"." - (let (result) - (dolist (name (dbus-list-names bus) (nreverse result)) - (unless (string-equal ":" (substring name 0 1)) - (push name result))))) + (seq-remove (lambda (name) + (= (string-to-char name) ?:)) + (dbus-list-names bus))) (defun dbus-list-queued-owners (bus service) "Return the unique names registered at D-Bus BUS and queued for SERVICE. @@ -1182,6 +1169,18 @@ dbus-peer-handler ;;; D-Bus introspection. +(defsubst dbus--introspect-names (object tag) + "Return the names of the children of OBJECT with TAG." + (mapcar (lambda (elt) + (dbus-introspect-get-attribute elt "name")) + (xml-get-children object tag))) + +(defsubst dbus--introspect-name (object tag name) + "Return the first child of OBJECT with TAG, whose name is NAME." + (seq-find (lambda (elt) + (string-equal (dbus-introspect-get-attribute elt "name") name)) + (xml-get-children object tag))) + (defun dbus-introspect (bus service path) "Return all interfaces and sub-nodes of SERVICE, registered at object path PATH at bus BUS. @@ -1197,17 +1196,25 @@ dbus-introspect bus service path dbus-interface-introspectable "Introspect" :timeout 1000))) +(defalias 'dbus--parse-xml-buffer + (if (libxml-available-p) + (lambda () + (xml-remove-comments (point-min) (point-max)) + (libxml-parse-xml-region (point-min) (point-max))) + (lambda () + (car (xml-parse-region (point-min) (point-max))))) + "Compatibility shim for `libxml-parse-xml-region'.") + (defun dbus-introspect-xml (bus service path) "Return the introspection data of SERVICE in D-Bus BUS at object path PATH. The data are a parsed list. The root object is a \"node\", representing the object path PATH. The root object can contain \"interface\" and further \"node\" objects." - ;; We don't want to raise errors. - (xml-node-name - (ignore-errors - (with-temp-buffer - (insert (dbus-introspect bus service path)) - (xml-parse-region (point-min) (point-max)))))) + (with-temp-buffer + ;; We don't want to raise errors. + (ignore-errors + (insert (dbus-introspect bus service path)) + (dbus--parse-xml-buffer)))) (defun dbus-introspect-get-attribute (object attribute) "Return the ATTRIBUTE value of D-Bus introspection OBJECT. @@ -1219,21 +1226,15 @@ dbus-introspect-get-node-names "Return all node names of SERVICE in D-Bus BUS at object path PATH. It returns a list of strings. The node names stand for further object paths of the D-Bus service." - (let ((object (dbus-introspect-xml bus service path)) - result) - (dolist (elt (xml-get-children object 'node) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names (dbus-introspect-xml bus service path) 'node)) (defun dbus-introspect-get-all-nodes (bus service path) "Return all node names of SERVICE in D-Bus BUS at object path PATH. It returns a list of strings, which are further object paths of SERVICE." - (let ((result (list path))) - (dolist (elt - (dbus-introspect-get-node-names bus service path) - result) - (setq elt (expand-file-name elt path)) - (setq result - (append result (dbus-introspect-get-all-nodes bus service elt)))))) + (cons path (mapcan (lambda (elt) + (setq elt (expand-file-name elt path)) + (dbus-introspect-get-all-nodes bus service elt)) + (dbus-introspect-get-node-names bus service path)))) (defun dbus-introspect-get-interface-names (bus service path) "Return all interface names of SERVICE in D-Bus BUS at object path PATH. @@ -1244,10 +1245,7 @@ dbus-introspect-get-interface-names interface is \"org.freedesktop.DBus.Properties\". If present, \"interface\" objects can also have \"property\" objects as children, beside \"method\" and \"signal\" objects." - (let ((object (dbus-introspect-xml bus service path)) - result) - (dolist (elt (xml-get-children object 'interface) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names (dbus-introspect-xml bus service path) 'interface)) (defun dbus-introspect-get-interface (bus service path interface) "Return the INTERFACE of SERVICE in D-Bus BUS at object path PATH. @@ -1255,22 +1253,14 @@ dbus-introspect-get-interface element of the list returned by `dbus-introspect-get-interface-names'. The resulting \"interface\" object can contain \"method\", \"signal\", \"property\" and \"annotation\" children." - (let ((elt (xml-get-children - (dbus-introspect-xml bus service path) 'interface))) - (while (and elt - (not (string-equal - interface - (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name (dbus-introspect-xml bus service path) + 'interface interface)) (defun dbus-introspect-get-method-names (bus service path interface) "Return a list of strings of all method names of INTERFACE. SERVICE is a service of D-Bus BUS at object path PATH." - (let ((object (dbus-introspect-get-interface bus service path interface)) - result) - (dolist (elt (xml-get-children object 'method) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (dbus-introspect-get-interface bus service path interface) 'method)) (defun dbus-introspect-get-method (bus service path interface method) "Return method METHOD of interface INTERFACE as XML object. @@ -1278,22 +1268,15 @@ dbus-introspect-get-method METHOD must be a string, element of the list returned by `dbus-introspect-get-method-names'. The resulting \"method\" object can contain \"arg\" and \"annotation\" children." - (let ((elt (xml-get-children - (dbus-introspect-get-interface bus service path interface) - 'method))) - (while (and elt - (not (string-equal - method (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (dbus-introspect-get-interface bus service path interface) + 'method method)) (defun dbus-introspect-get-signal-names (bus service path interface) "Return a list of strings of all signal names of INTERFACE. SERVICE is a service of D-Bus BUS at object path PATH." - (let ((object (dbus-introspect-get-interface bus service path interface)) - result) - (dolist (elt (xml-get-children object 'signal) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (dbus-introspect-get-interface bus service path interface) 'signal)) (defun dbus-introspect-get-signal (bus service path interface signal) "Return signal SIGNAL of interface INTERFACE as XML object. @@ -1301,22 +1284,15 @@ dbus-introspect-get-signal SIGNAL must be a string, element of the list returned by `dbus-introspect-get-signal-names'. The resulting \"signal\" object can contain \"arg\" and \"annotation\" children." - (let ((elt (xml-get-children - (dbus-introspect-get-interface bus service path interface) - 'signal))) - (while (and elt - (not (string-equal - signal (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (dbus-introspect-get-interface bus service path interface) + 'signal signal)) (defun dbus-introspect-get-property-names (bus service path interface) "Return a list of strings of all property names of INTERFACE. SERVICE is a service of D-Bus BUS at object path PATH." - (let ((object (dbus-introspect-get-interface bus service path interface)) - result) - (dolist (elt (xml-get-children object 'property) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (dbus-introspect-get-interface bus service path interface) 'property)) (defun dbus-introspect-get-property (bus service path interface property) "Return PROPERTY of INTERFACE as XML object. @@ -1324,15 +1300,9 @@ dbus-introspect-get-property PROPERTY must be a string, element of the list returned by `dbus-introspect-get-property-names'. The resulting PROPERTY object can contain \"annotation\" children." - (let ((elt (xml-get-children - (dbus-introspect-get-interface bus service path interface) - 'property))) - (while (and elt - (not (string-equal - property - (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (dbus-introspect-get-interface bus service path interface) + 'property property)) (defun dbus-introspect-get-annotation-names (bus service path interface &optional name) @@ -1340,15 +1310,13 @@ dbus-introspect-get-annotation-names If NAME is nil, the annotations are children of INTERFACE, otherwise NAME must be a \"method\", \"signal\", or \"property\" object, where the annotations belong to." - (let ((object - (if name - (or (dbus-introspect-get-method bus service path interface name) - (dbus-introspect-get-signal bus service path interface name) - (dbus-introspect-get-property bus service path interface name)) - (dbus-introspect-get-interface bus service path interface))) - result) - (dolist (elt (xml-get-children object 'annotation) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (if name + (or (dbus-introspect-get-method bus service path interface name) + (dbus-introspect-get-signal bus service path interface name) + (dbus-introspect-get-property bus service path interface name)) + (dbus-introspect-get-interface bus service path interface)) + 'annotation)) (defun dbus-introspect-get-annotation (bus service path interface name annotation) @@ -1356,22 +1324,13 @@ dbus-introspect-get-annotation If NAME is nil, ANNOTATION is a child of INTERFACE, otherwise NAME must be the name of a \"method\", \"signal\", or \"property\" object, where the ANNOTATION belongs to." - (let ((elt (xml-get-children - (if name - (or (dbus-introspect-get-method - bus service path interface name) - (dbus-introspect-get-signal - bus service path interface name) - (dbus-introspect-get-property - bus service path interface name)) - (dbus-introspect-get-interface bus service path interface)) - 'annotation))) - (while (and elt - (not (string-equal - annotation - (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (if name + (or (dbus-introspect-get-method bus service path interface name) + (dbus-introspect-get-signal bus service path interface name) + (dbus-introspect-get-property bus service path interface name)) + (dbus-introspect-get-interface bus service path interface)) + 'annotation annotation)) (defun dbus-introspect-get-argument-names (bus service path interface name) "Return a list of all argument names as list of strings. @@ -1379,26 +1338,19 @@ dbus-introspect-get-argument-names Argument names are optional, the function can return nil therefore, even if the method or signal has arguments." - (let ((object - (or (dbus-introspect-get-method bus service path interface name) - (dbus-introspect-get-signal bus service path interface name))) - result) - (dolist (elt (xml-get-children object 'arg) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (or (dbus-introspect-get-method bus service path interface name) + (dbus-introspect-get-signal bus service path interface name)) + 'arg)) (defun dbus-introspect-get-argument (bus service path interface name arg) "Return argument ARG as XML object. NAME must be a \"method\" or \"signal\" object. ARG must be a string, element of the list returned by `dbus-introspect-get-argument-names'." - (let ((elt (xml-get-children - (or (dbus-introspect-get-method bus service path interface name) - (dbus-introspect-get-signal bus service path interface name)) - 'arg))) - (while (and elt - (not (string-equal - arg (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (or (dbus-introspect-get-method bus service path interface name) + (dbus-introspect-get-signal bus service path interface name)) + 'arg arg)) (defun dbus-introspect-get-signature (bus service path interface name &optional direction) @@ -1468,13 +1420,10 @@ dbus-get-all-properties nil is returned." (dbus-ignore-errors ;; "GetAll" returns "a{sv}". - (let (result) - (dolist (dict - (dbus-call-method - bus service path dbus-interface-properties - "GetAll" :timeout 500 interface) - (nreverse result)) - (push (cons (car dict) (cl-caadr dict)) result))))) + (mapcar (lambda (dict) + (cons (car dict) (caadr dict))) + (dbus-call-method bus service path dbus-interface-properties + "GetAll" :timeout 500 interface)))) (defun dbus-register-property (bus service path interface property access value @@ -1519,13 +1468,13 @@ dbus-register-property ;; Add handlers for the three property-related methods. (dbus-register-method bus service path dbus-interface-properties "Get" - 'dbus-property-handler 'dont-register) + #'dbus-property-handler 'dont-register) (dbus-register-method bus service path dbus-interface-properties "GetAll" - 'dbus-property-handler 'dont-register) + #'dbus-property-handler 'dont-register) (dbus-register-method bus service path dbus-interface-properties "Set" - 'dbus-property-handler 'dont-register) + #'dbus-property-handler 'dont-register) ;; Register SERVICE. (unless (or dont-register-service (member service (dbus-list-names bus))) @@ -1672,7 +1621,7 @@ dbus-get-all-managed-objects (if (cadr entry2) ;; "sv". (dolist (entry3 (cadr entry2)) - (setcdr entry3 (cl-caadr entry3))) + (setcdr entry3 (caadr entry3))) (setcdr entry2 nil))))) ;; Fallback: collect the information. Slooow! @@ -1729,7 +1678,7 @@ dbus-managed-objects-handler (append (butlast last-input-event 4) (list object dbus-interface-properties - "GetAll" 'dbus-property-handler)))) + "GetAll" #'dbus-property-handler)))) (dbus-property-handler interface)))) (cdr (assoc object result))))))))) dbus-registered-objects-table) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index e263c4563f..45c9851365 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -176,8 +176,8 @@ dbus-test03-peer-interface (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") - (funcall - (if interactive 'ert-run-tests-interactively 'ert-run-tests-batch) "^dbus")) + (funcall (if interactive #'ert-run-tests-interactively #'ert-run-tests-batch) + "^dbus")) (provide 'dbus-tests) ;;; dbus-tests.el ends here -- 2.26.2 --=-=-= Content-Type: text/plain Are these changes acceptable? WDYT? Thanks, -- Basil In GNU Emacs 27.0.91 (build 12, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2020-06-06 built on thunk Repository revision: c1f4c0bc839324d2049ae45a74381684a5727f60 Repository branch: blc/27/dbus Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux bullseye/sid Configured using: 'configure 'CC=ccache gcc' 'CFLAGS=-O0 -g3 -ggdb -gdwarf-4' --config-cache --prefix=/home/blc/.local --program-suffix=27 --enable-checking=yes,glyphs --enable-check-lisp-object-type --with-x-toolkit=lucid --with-file-notification=yes --with-x' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 07:06:22 2020 Received: (at 41744) by debbugs.gnu.org; 8 Jun 2020 11:06:22 +0000 Received: from localhost ([127.0.0.1]:56001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiFbi-00050n-8u for submit@debbugs.gnu.org; Mon, 08 Jun 2020 07:06:22 -0400 Received: from mout.gmx.net ([212.227.15.19]:44311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiFbg-00050X-1Z for 41744@debbugs.gnu.org; Mon, 08 Jun 2020 07:06:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1591614373; bh=BPKMmVuOfCAzU2VTwbI8ZNHM8HEYOpvJvbv+7SQ0HWA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=A7/B+CpIE6bj+tr9tFIQxW0mHJoz5Jp8jNm3/iBjqV2jgD+Em21d1CcFBUbmy8dmL OvWMiC+ELhCWCqUtTjtu8ikyjhgyqBJMukW73qcUChZaTXmg9owu8zTK0zm0ZEIWFk ZOLL8qqnR+yeSac06kDFd2vlYisTjT1hZ0f7a2no= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.117.219]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M89Kr-1jdYVq0ZdL-005GyY; Mon, 08 Jun 2020 13:06:13 +0200 From: Michael Albinus To: "Basil L. Contovounesios" Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> Date: Mon, 08 Jun 2020 13:06:11 +0200 In-Reply-To: <87mu5fpyh1.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sun, 07 Jun 2020 00:26:50 +0100") Message-ID: <874krln7fg.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:WZAcSfMfu9uAn149vq632oNWBqAwKfU/afaJjvrUUnna392bQzb TicckQ0JTfBlURDpcsYBErNlHed/4+cbfIz3olPQZWOylmuIGtb1DNMqPJdvDsZWUs+J7Mf +ElSx6xPC4QBIAsr8v7lBLJgn46T0zAeFDw7cuVp9M45/MRx4SrYLki3GEwnHIGAU12NFSC fo1plKO6QTAHIvKMNUXLA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:JZ0sfWIf8uI=:uGwvaruvL362uJoYSujgTr tBprmPm4oZjINj4K57TcN62TIuwt5qNLcmsRJJn6ZxgoOo5j54D/6sCUX238NMxWy+JX+MpIy guapgZ0jYz1kljJbEWd9+thKnIpB2jA6TizWmHM4S0S5gorz4C5vlIxj8+IbNKis5aXtrPmMu 89oNUG3emaCrEGRIODFmxab5Y+XM2r3L4sl5VblwTspywLhYeOQzcLUFTW1bibcuCnhZVnF8B JlegIETUbRkM8suhyUidG1MPE1tL1i2Cl2TseESk0HXYRuMajraOnvjPN4nYmaGBO2IIO7TX3 P9rpJO5yq7FU6j9Tfv6FebtQi3KI+LxpP4VNmYGg9GFmKEgAUaQsul8kX4mp+aNztYWRz3uS7 Cm7L4TjMJl1vEBFyZlPCug6MWAG9HJXd5wY1qlnkP/Sns+/9yylLKbZhPyg6c4h3rA+o8WXQG RgpsLQ1oeNsD2ImjyIi4doOe02BkZK6iN3FPZs52dXe3WYuqTgglPxt2o7b8GzDWBBtO40JDs qCkVsYXAkSREGdePrrLvfYZbdX/bVsQhvQ+X13xFZA/f2Q51RzTABMJIzzKlGoZqS1yY5K0+7 jmDbCGqoFI2xGosdcVewc3FoI2YyLaDeDouWClPTIeq9FgZEbP9H2+ibJ4qtfTdtU1e5qMlqU fAMsO1Y64ZDfwxcXShHKHgyf4qHv64a0HdnE0pDLmhEIVmrHdZ2J0c9MCLcQ+PuD5UfBES3d4 sKNW309RjIXLFBGX15jUZ+yJPTIltmF0ymQ8DcrfUR6soogFHlpEu9sHheyOuGfpFJ+sxFy+1 rng2dnndps5mWMgKXxubA0bZG7Y6UVY5C5RkgNPoxzdtOi29V21g8dkQ/y3gJimQ30caMuex0 /5GXL3ZQbbII+qMrAHZ0Y39I3OpsraLyjm19yyoqo+VkkJdAWxigNZ38h0hdk5/bkZ9IDB24F Ey3CkTZfD78yoetzXcMCVlggp09twvoYfSEMAVyXr61ufmQkwbravobr+NWiiZRHa36bJkQD0 SWjsNnkHDIk2XSrcWr0Uj9zqxdDImRTTMCeh0hMIKHEwoN4nqIkAbslIkt2snwNIXVKpzSO// OIK5p4N+yJBLkL6E5wxj6a2PYTcXfg/hqSos/vckr+rR2QiiBaGcDjUaTtCdQyE9AZ6UgGzVI 57yI6fa3ZEadvhs8Eo1ECduc6w7+jlH1FmXYti9EA2qNHpcshqaqTpC5Jo2OdEnv4l7ZsMULO 99FViUdrYBxL+wI6y X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41744 Cc: 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "Basil L. Contovounesios" writes: Hi Basil, > While reading through the D-Bus manual and implementation, I noticed > some opportunities for small cleanups. Thanks a lot for your enourmous work! > I propose these documentation cleanups for emacs-27: In general, I agree with your changes. However, they are so large that I don't know whether they shall go into the emacs-27 branch. To be decided by Eli, I guess. > diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi The changed formatting of the examples exceeds sometimes 80 columns, maybe you can adapt the formatting. > And these implementation cleanups for master: This I will review once the first patch set has arrived in master. > Thanks, Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 10:00:13 2020 Received: (at 41744) by debbugs.gnu.org; 8 Jun 2020 14:00:13 +0000 Received: from localhost ([127.0.0.1]:57581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiIJw-0003NW-R1 for submit@debbugs.gnu.org; Mon, 08 Jun 2020 10:00:13 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:42483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiIJu-0003MG-E8 for 41744@debbugs.gnu.org; Mon, 08 Jun 2020 10:00:11 -0400 Received: by mail-wr1-f53.google.com with SMTP id p5so17499650wrw.9 for <41744@debbugs.gnu.org>; Mon, 08 Jun 2020 07:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=NAvoWYxw3AEFOHB/cXBHLMeoRqCaj3Yw9zJTelD2eDQ=; b=13cPW9M4pVUxCWYSlf4SMFeuDj9jYaBHrpajMgLx9K+EzIaU4EkT36y5iLLa7Ppseq 9VW2JF6VZPFcYcYQuYP8epyKH4k7rbHx5lF3ZyoUzbYrC3fCN+SLDiGA28k1R2Y2O+Mr znitPlK3wrxdOeyI6WaIi+wi3ig9iKVFYG49XE4Yo+Fo8hJxH+Kkce2SAt/JJ++p45eL qWWtuqt6zESw9HMD0ViVTP6Q7a+KB8qL4JvjRvEF9YDM1K1N6d9ttMKcl7O34rPMA3vc Wajl23wpmPtAi7shjwEpWIbqCDYrn6RDb8Zu4J+McGNmgq+sSdclpfq9b1/kX2zzo5zI KNZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=NAvoWYxw3AEFOHB/cXBHLMeoRqCaj3Yw9zJTelD2eDQ=; b=hV2BdEqpR4+Hw2dNXKMbzvmUlVtgLM2+7aYJyCyCzP3nhNOGM7JVg4oqllAYVJW5qw EEhCdSuiQfebRqw/ow99ZixBAS11H+zo1J/15scAc7pb1JNjtNrIdP6ptc2RRZoFfrNF NQ9cUw+yalwNxrliR9G5m7PBzXEhVAquGpOttUQOvqPdbly0qO+OHiXCuAd0lnypHag9 ney7IptcI8+fJw+h/+e1pri8O+SLsnmdZLSDlWBvLL+AkMRfNjOkA1xVy1ugdNRqIndj 8/zng2f+XsmGskoEMrUx0dpA5ymc4sHZL0JSV1vm3rUdkew6tOxt5KNUtYooU6+ClIEc x+QQ== X-Gm-Message-State: AOAM530gsvnFmtUD03kKdcElLFWNjF4qC1lG/sBbaCY9o1wf3P2araD1 kP27cAH++mKnxy/566AcOt30zw== X-Google-Smtp-Source: ABdhPJxWbjW1DMAdSe5vubzvBN3eA03idt8/Q4cFmB8dHLosM1AxjxmzPu0TUSPvATQaEpkiOvEEnw== X-Received: by 2002:a5d:5704:: with SMTP id a4mr23550432wrv.389.1591624804288; Mon, 08 Jun 2020 07:00:04 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id d17sm26044602wrg.75.2020.06.08.07.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 07:00:03 -0700 (PDT) From: "Basil L. Contovounesios" To: Michael Albinus Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> Date: Mon, 08 Jun 2020 15:00:01 +0100 In-Reply-To: <874krln7fg.fsf@gmx.de> (Michael Albinus's message of "Mon, 08 Jun 2020 13:06:11 +0200") Message-ID: <87sgf51wv2.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41744 Cc: 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > "Basil L. Contovounesios" writes: > >> While reading through the D-Bus manual and implementation, I noticed >> some opportunities for small cleanups. > > Thanks a lot for your enourmous work! > >> I propose these documentation cleanups for emacs-27: > > In general, I agree with your changes. Thanks for reviewing. > However, they are so large that I don't know whether they shall go > into the emacs-27 branch. To be decided by Eli, I guess. Sure. >> diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi > > The changed formatting of the examples exceeds sometimes 80 columns, > maybe you can adapt the formatting. None of my changes increase the width of either text or examples. The only example touched by the patch which already exceeds 80 columns is this: @lisp (@var{integer} ((@var{string} @var{bool} @var{bool}) (@var{string} @var{bool} @var{bool}) @dots{})) @end lisp But I left it alone because the result is less than 60 columns wide and looks nice to me: (INTEGER ((STRING BOOL BOOL) (STRING BOOL BOOL) ...)) Can you please point out which parts you want reformatted? >> And these implementation cleanups for master: > > This I will review once the first patch set has arrived in master. Sure, thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 10:20:19 2020 Received: (at 41744) by debbugs.gnu.org; 8 Jun 2020 14:20:19 +0000 Received: from localhost ([127.0.0.1]:57588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiIdP-0003pT-Id for submit@debbugs.gnu.org; Mon, 08 Jun 2020 10:20:19 -0400 Received: from mout.gmx.net ([212.227.15.15]:59657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiIdN-0003pF-Qo for 41744@debbugs.gnu.org; Mon, 08 Jun 2020 10:20:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1591626010; bh=XIPvqxyvCYs4fhCXwwsX+NtFIRN7XvxVGQ7QcDjSR4U=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=R1GyheYGXob1w7+DYW2+BPZDR6OZ7kc5raMeHl7AYLDDqX5cIEGYDyYiK4GXyBqSw FzRMEu+gURxk5Nj0dc5Xv9l0r3hnqMFIpOWtBwWce5hZ90xsF5XYiy7RR4mabcYlSt usRrx4sMjhfXgrcemTyEUlImQAlGNXPjy5IQxGBw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.117.219]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M7b6l-1jat2V2xgL-0080ys; Mon, 08 Jun 2020 16:20:10 +0200 From: Michael Albinus To: "Basil L. Contovounesios" Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> <87sgf51wv2.fsf@tcd.ie> Date: Mon, 08 Jun 2020 16:20:09 +0200 In-Reply-To: <87sgf51wv2.fsf@tcd.ie> (Basil L. Contovounesios's message of "Mon, 08 Jun 2020 15:00:01 +0100") Message-ID: <87v9k1ljvq.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:9Mn7aAhkICziTDdDQnfb8dAPuBipNuufFF3EsByzd/g4ft9UsXd imzh1u2ACk7vm5HbUXBNGyiEHk5cIHLBCrZI1Jo186QOJbAlISs711APQLW9Ft55CABSUwr a8lwuciTjiWRwcWTvv5TeAhRVzPv6uYDvyz9PlJE17ykk3rfY2pGv9JaFsfDHoDdcyjZOaG Yy6Tj9SDqYVBgtWOhaSvg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:NRnUa4Ltg1g=:AXMHcp5kMlqfIItWstZxwP 09EWubqe6Hgds92B9t3r3PVDDI7C/sI6IuZ9Z1HGGKeE/5MVkE1uTVGoCYuj4n1XyRRtgjQRW 6bSKugIQGA9Jg3uwuGGbO0uv3cmdCqOBgkMSo7Z0nnuwZNN5nryaVpF9frKdE+UTbBLkTg2kF MGWTO6pQSsdRd+ZB0b3blSP3cLfbcWurz1DRgT2U6oH0TjU/JNMlm8QK78Q649Ghiqrmmt1jL yAhldKiZkj0q+cf61C2Pg6fOf61O64H7uioFOgrbDXBS2lLHbzkuKE29/au0eYJpfd8aTxuU1 9UvCtug/DxjXJI4tzBsldY33YS39Nc1c+3C++JxEcpNwHe1s1TVRJ3lAQarcXQa30TKOHG1Zs zDSWYV5u8gRxXgjRXNBNHS/i0hPrI6oPqzYrHI8It4eO8iS6x3/r/af/x7aDc9yHdAVuVVtND hFCNhCF02Si1bOLodqnpHQ5Hg+A+rDypLZi0Sr+CbB3r+sh66JbpAFYKhCP2ytoo9boUnNgIh +GBzU4L92fJtbcOqOiJ7KAajU39iXXdXntwELu5WtJ8tMwCKqfksf8vpc2/NjT/lNCyhVc2NJ Jg1d/pQiT3dsrFst8VFpt5tTzzYQm61449uvUCUMhcUSZYHVQatDZzCAfOobaWcrEUxtQLl7H jDvKxdaUjfCGeQh+DCbiFretkC1cqy3dC0CLnDFliyqwqyWUHLwnNkDfs0B15W3t42gYuXq58 49PNl4EDHaju9j2gmZ2rAdyeDnhKS53Db8XAY74q8CU7lCumPh0oEjcXvXfC2UTczMT0VHsju ZEN5CbhD+7VWHkZa/SghkV8Ga/lXsuETNM4uRHSSsxzJFnTZAOM38uRfbep/FV4fw/ljU85o1 yzWtIFhBCrpruTrfdpRZxNvPW2aoPBM65pyDv+eaby+kdXIbFi/AkCDnjwgh7DpaNOocK5NcI uXYBZT3Cj9pNrSb2FMRKvwjtroEmkFHMp4ckxC1vTHs+4BSvDt3gpeMKA+MeHiMSJSMde6SVC bSERLNO9+h/TmUoelqsZFT8/rwc/NIadJjoTLMTQOjF4sgJLukstVLypJocBflH/9GTApUVSV rdKEaOLkFQBSrCSeG1FWE0N0MZw5RNa7e6L5ESUxBy9S8JrDRWs1dFeayx+DRv0aP/Nq9zLho g1TQv8l48zgPgyOoCV7UN5Jx7v0x1SF8bty+LTTNrSVGh1cJPAA20McZ1QS9quS/7P2qkQ95j 4n4yW4+pwd40appLW X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41744 Cc: 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "Basil L. Contovounesios" writes: Hi Basil, >> The changed formatting of the examples exceeds sometimes 80 columns, >> maybe you can adapt the formatting. > > None of my changes increase the width of either text or examples. The > only example touched by the patch which already exceeds 80 columns is > this: > > @lisp > (@var{integer} ((@var{string} @var{bool} @var{bool}) (@var{string} > @var{bool} @var{bool}) @dots{})) > @end lisp > > But I left it alone because the result is less than 60 columns wide and > looks nice to me: > > (INTEGER ((STRING BOOL BOOL) (STRING BOOL BOOL) ...)) > > Can you please point out which parts you want reformatted? I'm speaking about (info "(dbus) Introspection") See the example of dbus-introspect-get-attribute. I would move the arguments of dbus-introspect-xml into the next line. > Sure, thanks, Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 10:48:14 2020 Received: (at 41744) by debbugs.gnu.org; 8 Jun 2020 14:48:14 +0000 Received: from localhost ([127.0.0.1]:57618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiJ4Q-0004Vj-G4 for submit@debbugs.gnu.org; Mon, 08 Jun 2020 10:48:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiJ4O-0004VX-Ra for 41744@debbugs.gnu.org; Mon, 08 Jun 2020 10:48:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49731) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jiJ4I-0000xI-UJ; Mon, 08 Jun 2020 10:48:06 -0400 Received: from [176.228.60.248] (port=1371 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jiJ4I-0004G3-8R; Mon, 08 Jun 2020 10:48:06 -0400 Date: Mon, 08 Jun 2020 17:48:03 +0300 Message-Id: <83mu5d7gws.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-Reply-To: <874krln7fg.fsf@gmx.de> (message from Michael Albinus on Mon, 08 Jun 2020 13:06:11 +0200) Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41744 Cc: contovob@tcd.ie, 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Albinus > Date: Mon, 08 Jun 2020 13:06:11 +0200 > Cc: 41744@debbugs.gnu.org > > > I propose these documentation cleanups for emacs-27: > > In general, I agree with your changes. However, they are so large that I > don't know whether they shall go into the emacs-27 branch. To be decided > by Eli, I guess. Documentation changes are inherently safe. So if you (Michael) think the changes are for the better, go ahead and install on the release branch. If you aren't sure, e.g. if you think that some of the changes might be controversial, then master it is. I cannot tell which one is it because I know almost nothing about D-Bus. But if there are specific questions regarding specific parts of the text, I can try helping you make the decision, if you need help. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 10:52:10 2020 Received: (at 41744) by debbugs.gnu.org; 8 Jun 2020 14:52:10 +0000 Received: from localhost ([127.0.0.1]:57626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiJ8D-0004be-Vo for submit@debbugs.gnu.org; Mon, 08 Jun 2020 10:52:10 -0400 Received: from mout.gmx.net ([212.227.17.22]:38241) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiJ8C-0004bR-B8 for 41744@debbugs.gnu.org; Mon, 08 Jun 2020 10:52:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1591627921; bh=7RHt+Sdq+Yk1EKBamqlgdTmW8EPJ/T63CAxLH4uucuY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=b7+4gWVQFQzIrT50LiP2OlbX+u/RFf6E7SpaBLWtZjuHLV4izjJXkHOOY2myOhAoX 4AClH4A/O08b4MUUszeaA00hjRg6I1tBEK/Z5yXDGbtq+Axa2ejpZCOvTkljlPv2vh o48YcKykNMDK0Na9iznaMnC+sW1zfnhEn5isEf8Y= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.117.219]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGQnF-1jjiJQ1iRB-00GuA6; Mon, 08 Jun 2020 16:52:01 +0200 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> <83mu5d7gws.fsf@gnu.org> Date: Mon, 08 Jun 2020 16:52:00 +0200 In-Reply-To: <83mu5d7gws.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 08 Jun 2020 17:48:03 +0300") Message-ID: <87r1uplien.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:xTm49E521yboe6m3aoCrpElHjHdiAvljQgLYmOPLh//6snb2NRt RSUXfInxmCrrCzslHLHrAsYGYqqPGx2sinJ/jMaxrLJzSEbWH7D7VLzwOX7RsB/Jxle2rNU tHsjJpRYr6E02ui2u20LRT6HGNXVbONDnrSGx/8sFWhZJaoz/gGPhIYlFuDDQmYDTbue6sb 8CliniYhYb5u07w9Sr3yQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:uRblMjhxJ2s=:Hf3cRu4+7ILtfejYb65TCc 4kJ/OVYxqXcb3RK+azo333GT2PZkstiFYgtZRLNteYGHAdD0JOAbU4ps01nQeVU19T1Sa627Y Rd5fGBVIL1/HPvN5hTLhtXh6N8dFH8xShfT0w24U19yDV+Urma61CFgETqxyI6iLGfmd4NeAP oAE8jO3C331s/OnmvhJUWcHDHUKW3xZ0Pd3XMllTf0U9HHPU+zrdCYmQS2/kSXMNGHiOBkgQN 2jmcOhw+A1qAW6TOWP7viAhHO/iGL1nvdISTWi5Z/uFnevq/BERKHYGRr497Cttnb40jvztO9 C1lBEZby0R7mfQCPjLcDM4v9FTqEjS9S4sE87rANvfxGLbfDfFlXMeyymOEVs0qd8ZGcn14Vl vFG74xtnxZINPZuonstzt12Myiqk5l0dN8/A8ks63UG2NeUs+yieCfHvyXqqkDi4Bqy4VXmqa zD1Bnor0tn0ghha+mqiHZRX3mVL4f6kUzptLNvaPg0pUgphYES4wo1tCdPQBHww/UOof4iCg2 k5ZJkQO8ozZUMp3cY9qkwD2M81wUglzYEG0igDjt0411Uide6C0q9hjn9HTjlCwYIg4gBA7wc fhip0pmVXzrVVZExDzikHlthOjGhk04zuJw8oix3KvzGdghAslDEEN+mysTeIUhkFBTalNogN 1+Q0yxwemC3kR3lSC/JuaN6ll35ZDxy/mteULNALBbWEvU8/yhN/RoSlxuaHH118ZDk7R21TJ ZxSoKuTR8DMZlWvRePYC/htjZlUhMAC9QfC5bN6lNGN4elAmelYJkNS7V7FGstGz6OJtKq7Z5 zI4s2RQM9NdHrXixiwjw1xAeS1/DbgqbH16bm1AIEnYTG7z7GyA9HK9h317SRCm+XabYivQMi 2hxtYqZOznptkrxe/LXvQZEqzDusbpWnN6+TE1QzcUa5QgEPx/qLaaOipAly4pa6Nba7AJrOK uCeKBGgrSfzJezkYehx4iJ/hnofRCSEtFApk3AQFdRVYKHX1gHkY28010E0YwkkVDxL7MRkFL mgb8VJcFIm8xYNyjXFYjVkLSbvjJJKUel4py8t0X6eB6R9osBWgNGw7/PQNPbL3YLA2vBGkAN eQ1HJ5wkThtEORVG04vjDSHn7CMoXc/QDMDM7gwkbyAMF0xBsrj+oLi+UGQ8LB90OJPO9Qn0r WaXmTO4NSd3Uneub9OYFhYIvtP6xFCAxgwcOmhlySi2h8wWAkNcMzTUB84SszD2gJzez8sZ7f 2lyuG2yKa8UTDn7HN Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41744 Cc: contovob@tcd.ie, 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: >> > I propose these documentation cleanups for emacs-27: >> >> In general, I agree with your changes. However, they are so large that = I >> don't know whether they shall go into the emacs-27 branch. To be decide= d >> by Eli, I guess. > > Documentation changes are inherently safe. So if you (Michael) think > the changes are for the better, go ahead and install on the release > branch. If you aren't sure, e.g. if you think that some of the > changes might be controversial, then master it is. IMHO, there are no controversial pieces. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 08 13:28:59 2020 Received: (at 41744) by debbugs.gnu.org; 8 Jun 2020 17:28:59 +0000 Received: from localhost ([127.0.0.1]:57784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiLZz-0008QY-Ks for submit@debbugs.gnu.org; Mon, 08 Jun 2020 13:28:59 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:37616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jiLZx-0008QM-Vk for 41744@debbugs.gnu.org; Mon, 08 Jun 2020 13:28:58 -0400 Received: by mail-wr1-f50.google.com with SMTP id x13so18305399wrv.4 for <41744@debbugs.gnu.org>; Mon, 08 Jun 2020 10:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=XnAKB06fAq3n9we2jfoY/3Ca2nLMdntMqdb1BFdepho=; b=H99kGxv5HvNehsIcnOACB52yGIb2BNeNMJC4z7SS1KRhFKNdu6OP1NpSxgGAObozi/ CU0yFud7RWadobQt+9E63pbE/mHwYvVA0/XsCUZQekkT+a+Rq7mDmeStFlR4NGLLzIUb nbNJykJWJPSH25C/K4UCS8pYeJZlPjsszADPKGCCzvGxfoBECj/T1sF60wYGlDoWC+WN gOj/JX/2aY+bMZIE9HBKnMF6VmasfvdrnAMpaWlRgcAvNVYAvJLhopgnwmqMYrx3HWv6 N6KW5NnP4N9uzoEOT5KcRrhlba3S3YPe3CT22ptXBBIL02ML8O5bz+hutBZi6CMunXl6 lF7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=XnAKB06fAq3n9we2jfoY/3Ca2nLMdntMqdb1BFdepho=; b=QU0m3Jf6w+QzeW0ngrQgyuDOG4Enp96BeTjmLM6gPIA06KLZP5X2uQ/bAON0iSw5Q7 1ZtPFVavCixMvfxUdx68p7ZZA8AfzM7ANccqgOY3PrVHrDeZO45Yy4bm2i0ZSJj5O0fD NbM/AoyRcQdtRdeYOCw6xc7xv6rL41fkQsFJjSFix08zN31injIz/eoG0ZHJ7yEpLUfF UBWX5K/9+jDBSHQol21pzL+dtnSlIZfW/59tvTQg/SkTfWTWRdwu5BVeLAatcdCuEgw5 ejM6nf7KHGZR8pXSCQLj7czJVPKf7jJ2jdApj7WzO3hhzfjDWZpcU7rIzDg+ZQSKAFlp bcTQ== X-Gm-Message-State: AOAM533JiinzluiUBUn2OpcK31XHeLyzVmGtCbP2YgU+ry6wssHUFuGI 0qaYboiCwdOpolTTRE2G12CkAg== X-Google-Smtp-Source: ABdhPJxScEnyZDaBgbcuXfjnMbGpalUInkjHdGxwQOgjjRnbde3r/0q3Ltm0kSfF4X4pVScX3AwQuA== X-Received: by 2002:adf:db47:: with SMTP id f7mr25707755wrj.101.1591637332035; Mon, 08 Jun 2020 10:28:52 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id o6sm423432wrp.3.2020.06.08.10.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 10:28:51 -0700 (PDT) From: "Basil L. Contovounesios" To: Michael Albinus Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> <83mu5d7gws.fsf@gnu.org> <87r1uplien.fsf@gmx.de> Date: Mon, 08 Jun 2020 18:28:49 +0100 In-Reply-To: <87r1uplien.fsf@gmx.de> (Michael Albinus's message of "Mon, 08 Jun 2020 16:52:00 +0200") Message-ID: <871rmp1n72.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41744 Cc: Eli Zaretskii , 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > Eli Zaretskii writes: > >>> > I propose these documentation cleanups for emacs-27: >>> >>> In general, I agree with your changes. However, they are so large that I >>> don't know whether they shall go into the emacs-27 branch. To be decided >>> by Eli, I guess. >> >> Documentation changes are inherently safe. So if you (Michael) think >> the changes are for the better, go ahead and install on the release >> branch. If you aren't sure, e.g. if you think that some of the >> changes might be controversial, then master it is. > > IMHO, there are no controversial pieces. Thanks, I've therefore incorporated the line breaks you suggested and pushed the first patch to emacs-27. Clean up D-Bus documentation (bug#41744) 43ad7dc1af 2020-06-08 18:19:50 +0100 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=43ad7dc1af327486963e5e3a3ae8efdb454fd38d I'll ping this bug again in probably a week's time when the changes have propagated to master. -- Basil From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 17 16:08:59 2020 Received: (at 41744) by debbugs.gnu.org; 17 Jun 2020 20:09:00 +0000 Received: from localhost ([127.0.0.1]:52238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jleMk-0005TY-SW for submit@debbugs.gnu.org; Wed, 17 Jun 2020 16:08:59 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:39034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jleMh-0005TG-1h for 41744@debbugs.gnu.org; Wed, 17 Jun 2020 16:08:58 -0400 Received: by mail-wr1-f51.google.com with SMTP id t18so3706458wru.6 for <41744@debbugs.gnu.org>; Wed, 17 Jun 2020 13:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=nukaSV/+SNvtrVrbSdpRjlyV5bGLLtAH7Ifq3LO77Eg=; b=tAefSs/zd3Koo9FQH2sZGvUMLLwmGZDPhliESG37ZfrrZdVxb2KNu4Q5tDcOAHxI0d 3mOQdyV2vy/YbQRMYigMJ3mLNkcDHQ8hXF+QQjFNMYpwyPq+hfOQwB1MHWjDdbbqjsP6 /rEZZr9Q0UYzOaYlcuxYVWpzoCkyZkXip5MErLLL7qneMaHYTMhkrCTsRnHuoyGxvot/ Aw+lAov0YNKixS28VufnqOUNfhV9hNY7QwKPUD2NIjVOAZAv6nTWxHmEj3t9fhr+3mF+ avbJ6p9R1KdRwcuiBnZ1stLmsG3jnhd+aHiMfdMKTHe8yNoMURG/1xlXc6g7h0xGGpWF jRGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=nukaSV/+SNvtrVrbSdpRjlyV5bGLLtAH7Ifq3LO77Eg=; b=OqmJKqzA4JW+g6UMemL4V2TqUqea2UYeLwCioKN121GcNKtUKgEOfYR4xlOAyHMaQy 0pMnZHNeFUiVx4vNmhsruX5qlmEBILBfLn9hNnQKwtxvSly6k+nyntaU9JGWT3LiXwvN m9NUZQ18IH3h0+A9gKPMr+OXf11OFbmCpc4Nu2JHSq+yHb2gKqwaa6jcDss1JuwAaqMj iSv7q8xsJfBS0sHAN3u9Ygwp8SrQBu1Q+HplqvhBtZBzxoRMX2rjy5ftxr0dvaIruDSy xP+xsg2xs+lUR8x8HaI3XdmlPIMqbKz47G3VY51V90tQtj1TYcpOnMSinI5z2vgIaJ0E 9whQ== X-Gm-Message-State: AOAM533GecSeWYzJeE3VxyFxSPnd+atS+Iaii3fjh14zthKfMjRiYOlR 8FmcFxrflYwYHZgcBURWUjchoQ== X-Google-Smtp-Source: ABdhPJzkqf1wa2Bbk57zFFfZGbEIerL7M3E0X58I8F6Cx1IoFLRkXknTYcmcRj6ePdktYpXfdhaPnw== X-Received: by 2002:a05:6000:1146:: with SMTP id d6mr924389wrx.400.1592424528987; Wed, 17 Jun 2020 13:08:48 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id y132sm966761wmb.11.2020.06.17.13.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 13:08:47 -0700 (PDT) From: "Basil L. Contovounesios" To: Michael Albinus Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> Date: Wed, 17 Jun 2020 21:08:46 +0100 In-Reply-To: <874krln7fg.fsf@gmx.de> (Michael Albinus's message of "Mon, 08 Jun 2020 13:06:11 +0200") Message-ID: <87d05xbgkx.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41744 Cc: 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Michael Albinus writes: > "Basil L. Contovounesios" writes: > >> And these implementation cleanups for master: > > This I will review once the first patch set has arrived in master. The doc patch for emacs-27 has now propagated to master, so here's a rebased version of the patch for master. WDYT? Thanks, -- Basil --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Various-dbus.el-cleanups-bug-41744.patch >From 37e8bcd3b14ee3a26a817ae95f6568db7e379fcf Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sat, 6 Jun 2020 13:20:06 +0100 Subject: [PATCH] Various dbus.el cleanups (bug#41744) * lisp/net/dbus.el: Remove unneeded dependency on cl-lib.el. Quote function symbols as such. (dbus-ignore-errors): Don't add macro name to font-lock keywords, as emacs-lisp-mode now dynamically fontifies new macro definitions. (dbus-call-method-non-blocking): Define as obosolete alias using define-obsolete-function-alias. (dbus-register-signal, dbus-escape-as-identifier): Simplify. Use regexp \` and \' in place of ^ and $. (dbus--parse-xml-buffer): New function for libxml2 compatibility. (dbus-introspect-xml): Use it. (dbus-string-to-byte-array, dbus-byte-array-to-string) (dbus-unescape-from-identifier, dbus-list-known-names) (dbus-introspect-get-all-nodes, dbus-get-all-properties) (dbus-get-all-managed-objects): Simplify. (dbus--introspect-names, dbus--introspect-name): New convenience functions. (dbus-introspect-get-node-names) (dbus-introspect-get-interface-names) (dbus-introspect-get-interface, dbus-introspect-get-method-names) (dbus-introspect-get-method, dbus-introspect-get-signal-names) (dbus-introspect-get-signal, dbus-introspect-get-property-names) (dbus-introspect-get-property) (dbus-introspect-get-annotation-names) (dbus-introspect-get-annotation) (dbus-introspect-get-argument-names, dbus-introspect-get-argument): Use them to DRY. * test/lisp/net/dbus-tests.el (dbus-test-all): Quote function symbols as such. --- lisp/net/dbus.el | 269 +++++++++++++++--------------------- test/lisp/net/dbus-tests.el | 4 +- 2 files changed, 111 insertions(+), 162 deletions(-) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 06bd9e567f..e2e95b8e57 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -51,9 +51,6 @@ dbus-registered-objects-table (unless (boundp 'dbus-debug) (defvar dbus-debug nil)) -;; Pacify byte compiler. -(eval-when-compile (require 'cl-lib)) - (require 'xml) (defconst dbus-service-dbus "org.freedesktop.DBus" @@ -169,7 +166,6 @@ dbus-ignore-errors `(condition-case err (progn ,@body) (dbus-error (when dbus-debug (signal (car err) (cdr err)))))) -(font-lock-add-keywords 'emacs-lisp-mode '("\\")) (define-obsolete-variable-alias 'dbus-event-error-hooks 'dbus-event-error-functions "24.3") @@ -181,7 +177,7 @@ dbus-event-error-functions ;;; Basic D-Bus message functions. -(defvar dbus-return-values-table (make-hash-table :test 'equal) +(defvar dbus-return-values-table (make-hash-table :test #'equal) "Hash table for temporarily storing arguments of reply messages. A key in this hash table is a list (:serial BUS SERIAL), like in `dbus-registered-objects-table'. BUS is either a Lisp symbol, @@ -301,8 +297,8 @@ dbus-call-method (check-interval 0.001) (key (apply - 'dbus-message-internal dbus-message-type-method-call - bus service path interface method 'dbus-call-method-handler args)) + #'dbus-message-internal dbus-message-type-method-call + bus service path interface method #'dbus-call-method-handler args)) (result (cons :pending nil))) ;; Wait until `dbus-call-method-handler' has put the result into @@ -339,8 +335,8 @@ dbus-call-method (remhash key dbus-return-values-table)))) ;; `dbus-call-method' works non-blocking now. -(defalias 'dbus-call-method-non-blocking 'dbus-call-method) -(make-obsolete 'dbus-call-method-non-blocking 'dbus-call-method "24.3") +(define-obsolete-function-alias 'dbus-call-method-non-blocking + #'dbus-call-method "24.3") (defun dbus-call-method-asynchronously (bus service path interface method handler &rest args) @@ -406,7 +402,7 @@ dbus-call-method-asynchronously (or (null handler) (functionp handler) (signal 'wrong-type-argument (list 'functionp handler))) - (apply 'dbus-message-internal dbus-message-type-method-call + (apply #'dbus-message-internal dbus-message-type-method-call bus service path interface method handler args)) (defun dbus-send-signal (bus service path interface signal &rest args) @@ -454,7 +450,7 @@ dbus-send-signal (or (stringp signal) (signal 'wrong-type-argument (list 'stringp signal))) - (apply 'dbus-message-internal dbus-message-type-signal + (apply #'dbus-message-internal dbus-message-type-signal bus service path interface signal args)) (defun dbus-method-return-internal (bus service serial &rest args) @@ -470,7 +466,7 @@ dbus-method-return-internal (or (natnump serial) (signal 'wrong-type-argument (list 'natnump serial))) - (apply 'dbus-message-internal dbus-message-type-method-return + (apply #'dbus-message-internal dbus-message-type-method-return bus service serial args)) (defun dbus-method-error-internal (bus service serial &rest args) @@ -486,7 +482,7 @@ dbus-method-error-internal (or (natnump serial) (signal 'wrong-type-argument (list 'natnump serial))) - (apply 'dbus-message-internal dbus-message-type-error + (apply #'dbus-message-internal dbus-message-type-error bus service serial args)) @@ -552,13 +548,13 @@ dbus-register-service `:already-owner': Service is already the primary owner." ;; Add Peer handler. - (dbus-register-method - bus service nil dbus-interface-peer "Ping" 'dbus-peer-handler 'dont-register) + (dbus-register-method bus service nil dbus-interface-peer "Ping" + #'dbus-peer-handler 'dont-register) ;; Add ObjectManager handler. (dbus-register-method bus service nil dbus-interface-objectmanager "GetManagedObjects" - 'dbus-managed-objects-handler 'dont-register) + #'dbus-managed-objects-handler 'dont-register) (let ((arg 0) reply) @@ -681,7 +677,7 @@ dbus-register-signal (if (and (stringp service) (not (zerop (length service))) (not (string-equal service dbus-service-dbus)) - (not (string-match "^:" service))) + (/= (string-to-char service) ?:)) (setq uname (dbus-get-name-owner bus service)) (setq uname service)) @@ -710,7 +706,7 @@ dbus-register-signal ;; `:arg0' .. `:arg63', `:path0' .. `:path63'. ((and (keywordp key) (string-match - "^:\\(arg\\|path\\)\\([[:digit:]]+\\)$" + "\\`:\\(arg\\|path\\)\\([[:digit:]]+\\)\\'" (symbol-name key))) (setq counter (match-string 2 (symbol-name key)) args (cdr args) @@ -726,9 +722,7 @@ dbus-register-signal "path" "") value)) ;; `:arg-namespace', `:path-namespace'. - ((and (keywordp key) - (string-match - "^:\\(arg\\|path\\)-namespace$" (symbol-name key))) + ((memq key '(:arg-namespace :path-namespace)) (setq args (cdr args) value (car args)) (unless (stringp value) @@ -736,8 +730,7 @@ dbus-register-signal (list "Wrong argument" key value))) (format ",%s='%s'" - (if (string-equal (match-string 1 (symbol-name key)) "path") - "path_namespace" "arg0namespace") + (if (eq key :path-namespace) "path_namespace" "arg0namespace") value)) ;; `:eavesdrop'. ((eq key :eavesdrop) @@ -751,11 +744,11 @@ dbus-register-signal bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus "AddMatch" rule) (dbus-error - (if (not (string-match "eavesdrop" rule)) + (if (not (string-match-p "eavesdrop" rule)) (signal (car err) (cdr err)) ;; The D-Bus spec says we shall fall back to a rule without eavesdrop. (when dbus-debug (message "Removing eavesdrop from rule %s" rule)) - (setq rule (replace-regexp-in-string ",eavesdrop='true'" "" rule)) + (setq rule (replace-regexp-in-string ",eavesdrop='true'" "" rule t t)) (dbus-call-method bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus "AddMatch" rule)))) @@ -893,9 +886,7 @@ dbus-string-to-byte-array STRING shall be UTF-8 coded." (if (zerop (length string)) '(:array :signature "y") - (let (result) - (dolist (elt (string-to-list string) (append '(:array) result)) - (setq result (append result (list :byte elt))))))) + (cons :array (mapcan (lambda (c) (list :byte c)) string)))) (defun dbus-byte-array-to-string (byte-array &optional multibyte) "Transform BYTE-ARRAY into UTF-8 coded string. @@ -903,12 +894,9 @@ dbus-byte-array-to-string array as produced by `dbus-string-to-byte-array'. The resulting string is unibyte encoded, unless MULTIBYTE is non-nil." (apply - (if multibyte 'string 'unibyte-string) - (if (equal byte-array '(:array :signature "y")) - nil - (let (result) - (dolist (elt byte-array result) - (when (characterp elt) (setq result (append result `(,elt))))))))) + (if multibyte #'string #'unibyte-string) + (unless (equal byte-array '(:array :signature "y")) + (seq-filter #'characterp byte-array)))) (defun dbus-escape-as-identifier (string) "Escape an arbitrary STRING so it follows the rules for a C identifier. @@ -930,9 +918,9 @@ dbus-escape-as-identifier (if (zerop (length string)) "_" (replace-regexp-in-string - "^[0-9]\\|[^A-Za-z0-9]" + "\\`[0-9]\\|[^A-Za-z0-9]" (lambda (x) (format "_%2x" (aref x 0))) - string))) + string nil t))) (defun dbus-unescape-from-identifier (string) "Retrieve the original string from the encoded STRING as unibyte string. @@ -942,7 +930,7 @@ dbus-unescape-from-identifier (replace-regexp-in-string "_.." (lambda (x) (byte-to-string (string-to-number (substring x 1) 16))) - string))) + string nil t))) ;;; D-Bus events. @@ -1020,7 +1008,7 @@ dbus-handle-event (if (eq result :ignore) (dbus-method-return-internal (nth 1 event) (nth 4 event) (nth 3 event)) - (apply 'dbus-method-return-internal + (apply #'dbus-method-return-internal (nth 1 event) (nth 4 event) (nth 3 event) (if (consp result) result (list result))))))) ;; Error handling. @@ -1119,10 +1107,9 @@ dbus-list-names (defun dbus-list-known-names (bus) "Retrieve all services which correspond to a known name in BUS. A service has a known name if it doesn't start with \":\"." - (let (result) - (dolist (name (dbus-list-names bus) (nreverse result)) - (unless (string-equal ":" (substring name 0 1)) - (push name result))))) + (seq-remove (lambda (name) + (= (string-to-char name) ?:)) + (dbus-list-names bus))) (defun dbus-list-queued-owners (bus service) "Return the unique names registered at D-Bus BUS and queued for SERVICE. @@ -1182,6 +1169,18 @@ dbus-peer-handler ;;; D-Bus introspection. +(defsubst dbus--introspect-names (object tag) + "Return the names of the children of OBJECT with TAG." + (mapcar (lambda (elt) + (dbus-introspect-get-attribute elt "name")) + (xml-get-children object tag))) + +(defsubst dbus--introspect-name (object tag name) + "Return the first child of OBJECT with TAG, whose name is NAME." + (seq-find (lambda (elt) + (string-equal (dbus-introspect-get-attribute elt "name") name)) + (xml-get-children object tag))) + (defun dbus-introspect (bus service path) "Return all interfaces and sub-nodes of SERVICE, registered at object path PATH at bus BUS. @@ -1197,17 +1196,25 @@ dbus-introspect bus service path dbus-interface-introspectable "Introspect" :timeout 1000))) +(defalias 'dbus--parse-xml-buffer + (if (libxml-available-p) + (lambda () + (xml-remove-comments (point-min) (point-max)) + (libxml-parse-xml-region (point-min) (point-max))) + (lambda () + (car (xml-parse-region (point-min) (point-max))))) + "Compatibility shim for `libxml-parse-xml-region'.") + (defun dbus-introspect-xml (bus service path) "Return the introspection data of SERVICE in D-Bus BUS at object path PATH. The data are a parsed list. The root object is a \"node\", representing the object path PATH. The root object can contain \"interface\" and further \"node\" objects." - ;; We don't want to raise errors. - (xml-node-name - (ignore-errors - (with-temp-buffer - (insert (dbus-introspect bus service path)) - (xml-parse-region (point-min) (point-max)))))) + (with-temp-buffer + ;; We don't want to raise errors. + (ignore-errors + (insert (dbus-introspect bus service path)) + (dbus--parse-xml-buffer)))) (defun dbus-introspect-get-attribute (object attribute) "Return the ATTRIBUTE value of D-Bus introspection OBJECT. @@ -1219,21 +1226,15 @@ dbus-introspect-get-node-names "Return all node names of SERVICE in D-Bus BUS at object path PATH. It returns a list of strings. The node names stand for further object paths of the D-Bus service." - (let ((object (dbus-introspect-xml bus service path)) - result) - (dolist (elt (xml-get-children object 'node) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names (dbus-introspect-xml bus service path) 'node)) (defun dbus-introspect-get-all-nodes (bus service path) "Return all node names of SERVICE in D-Bus BUS at object path PATH. It returns a list of strings, which are further object paths of SERVICE." - (let ((result (list path))) - (dolist (elt - (dbus-introspect-get-node-names bus service path) - result) - (setq elt (expand-file-name elt path)) - (setq result - (append result (dbus-introspect-get-all-nodes bus service elt)))))) + (cons path (mapcan (lambda (elt) + (setq elt (expand-file-name elt path)) + (dbus-introspect-get-all-nodes bus service elt)) + (dbus-introspect-get-node-names bus service path)))) (defun dbus-introspect-get-interface-names (bus service path) "Return all interface names of SERVICE in D-Bus BUS at object path PATH. @@ -1244,10 +1245,7 @@ dbus-introspect-get-interface-names \"org.freedesktop.DBus.Properties\". If present, \"interface\" objects can also have \"property\" objects as children, beside \"method\" and \"signal\" objects." - (let ((object (dbus-introspect-xml bus service path)) - result) - (dolist (elt (xml-get-children object 'interface) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names (dbus-introspect-xml bus service path) 'interface)) (defun dbus-introspect-get-interface (bus service path interface) "Return the INTERFACE of SERVICE in D-Bus BUS at object path PATH. @@ -1256,22 +1254,14 @@ dbus-introspect-get-interface `dbus-introspect-get-interface-names'. The resulting \"interface\" object can contain \"method\", \"signal\", \"property\" and \"annotation\" children." - (let ((elt (xml-get-children - (dbus-introspect-xml bus service path) 'interface))) - (while (and elt - (not (string-equal - interface - (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name (dbus-introspect-xml bus service path) + 'interface interface)) (defun dbus-introspect-get-method-names (bus service path interface) "Return a list of strings of all method names of INTERFACE. SERVICE is a service of D-Bus BUS at object path PATH." - (let ((object (dbus-introspect-get-interface bus service path interface)) - result) - (dolist (elt (xml-get-children object 'method) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (dbus-introspect-get-interface bus service path interface) 'method)) (defun dbus-introspect-get-method (bus service path interface method) "Return method METHOD of interface INTERFACE as an XML object. @@ -1279,22 +1269,15 @@ dbus-introspect-get-method METHOD must be a string and a member of the list returned by `dbus-introspect-get-method-names'. The resulting \"method\" object can contain \"arg\" and \"annotation\" children." - (let ((elt (xml-get-children - (dbus-introspect-get-interface bus service path interface) - 'method))) - (while (and elt - (not (string-equal - method (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (dbus-introspect-get-interface bus service path interface) + 'method method)) (defun dbus-introspect-get-signal-names (bus service path interface) "Return a list of strings of all signal names of INTERFACE. SERVICE is a service of D-Bus BUS at object path PATH." - (let ((object (dbus-introspect-get-interface bus service path interface)) - result) - (dolist (elt (xml-get-children object 'signal) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (dbus-introspect-get-interface bus service path interface) 'signal)) (defun dbus-introspect-get-signal (bus service path interface signal) "Return signal SIGNAL of interface INTERFACE as an XML object. @@ -1302,22 +1285,15 @@ dbus-introspect-get-signal SIGNAL must be a string, element of the list returned by `dbus-introspect-get-signal-names'. The resulting \"signal\" object can contain \"arg\" and \"annotation\" children." - (let ((elt (xml-get-children - (dbus-introspect-get-interface bus service path interface) - 'signal))) - (while (and elt - (not (string-equal - signal (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (dbus-introspect-get-interface bus service path interface) + 'signal signal)) (defun dbus-introspect-get-property-names (bus service path interface) "Return a list of strings of all property names of INTERFACE. SERVICE is a service of D-Bus BUS at object path PATH." - (let ((object (dbus-introspect-get-interface bus service path interface)) - result) - (dolist (elt (xml-get-children object 'property) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (dbus-introspect-get-interface bus service path interface) 'property)) (defun dbus-introspect-get-property (bus service path interface property) "Return PROPERTY of INTERFACE as an XML object. @@ -1325,15 +1301,9 @@ dbus-introspect-get-property PROPERTY must be a string and a member of the list returned by `dbus-introspect-get-property-names'. The resulting PROPERTY object can contain \"annotation\" children." - (let ((elt (xml-get-children - (dbus-introspect-get-interface bus service path interface) - 'property))) - (while (and elt - (not (string-equal - property - (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (dbus-introspect-get-interface bus service path interface) + 'property property)) (defun dbus-introspect-get-annotation-names (bus service path interface &optional name) @@ -1341,15 +1311,13 @@ dbus-introspect-get-annotation-names If NAME is nil, the annotations are children of INTERFACE, otherwise NAME must be a \"method\", \"signal\", or \"property\" object, where the annotations belong to." - (let ((object - (if name - (or (dbus-introspect-get-method bus service path interface name) - (dbus-introspect-get-signal bus service path interface name) - (dbus-introspect-get-property bus service path interface name)) - (dbus-introspect-get-interface bus service path interface))) - result) - (dolist (elt (xml-get-children object 'annotation) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (if name + (or (dbus-introspect-get-method bus service path interface name) + (dbus-introspect-get-signal bus service path interface name) + (dbus-introspect-get-property bus service path interface name)) + (dbus-introspect-get-interface bus service path interface)) + 'annotation)) (defun dbus-introspect-get-annotation (bus service path interface name annotation) @@ -1357,22 +1325,13 @@ dbus-introspect-get-annotation If NAME is nil, ANNOTATION is a child of INTERFACE, otherwise NAME must be the name of a \"method\", \"signal\", or \"property\" object, where the ANNOTATION belongs to." - (let ((elt (xml-get-children - (if name - (or (dbus-introspect-get-method - bus service path interface name) - (dbus-introspect-get-signal - bus service path interface name) - (dbus-introspect-get-property - bus service path interface name)) - (dbus-introspect-get-interface bus service path interface)) - 'annotation))) - (while (and elt - (not (string-equal - annotation - (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (if name + (or (dbus-introspect-get-method bus service path interface name) + (dbus-introspect-get-signal bus service path interface name) + (dbus-introspect-get-property bus service path interface name)) + (dbus-introspect-get-interface bus service path interface)) + 'annotation annotation)) (defun dbus-introspect-get-argument-names (bus service path interface name) "Return a list of all argument names as a list of strings. @@ -1380,27 +1339,20 @@ dbus-introspect-get-argument-names Argument names are optional, the function can return nil therefore, even if the method or signal has arguments." - (let ((object - (or (dbus-introspect-get-method bus service path interface name) - (dbus-introspect-get-signal bus service path interface name))) - result) - (dolist (elt (xml-get-children object 'arg) (nreverse result)) - (push (dbus-introspect-get-attribute elt "name") result)))) + (dbus--introspect-names + (or (dbus-introspect-get-method bus service path interface name) + (dbus-introspect-get-signal bus service path interface name)) + 'arg)) (defun dbus-introspect-get-argument (bus service path interface name arg) "Return argument ARG as XML object. NAME must be a \"method\" or \"signal\" object. ARG must be a string and a member of the list returned by `dbus-introspect-get-argument-names'." - (let ((elt (xml-get-children - (or (dbus-introspect-get-method bus service path interface name) - (dbus-introspect-get-signal bus service path interface name)) - 'arg))) - (while (and elt - (not (string-equal - arg (dbus-introspect-get-attribute (car elt) "name")))) - (setq elt (cdr elt))) - (car elt))) + (dbus--introspect-name + (or (dbus-introspect-get-method bus service path interface name) + (dbus-introspect-get-signal bus service path interface name)) + 'arg arg)) (defun dbus-introspect-get-signature (bus service path interface name &optional direction) @@ -1469,13 +1421,10 @@ dbus-get-all-properties nil is returned." (dbus-ignore-errors ;; "GetAll" returns "a{sv}". - (let (result) - (dolist (dict - (dbus-call-method - bus service path dbus-interface-properties - "GetAll" :timeout 500 interface) - (nreverse result)) - (push (cons (car dict) (cl-caadr dict)) result))))) + (mapcar (lambda (dict) + (cons (car dict) (caadr dict))) + (dbus-call-method bus service path dbus-interface-properties + "GetAll" :timeout 500 interface)))) (defun dbus-register-property (bus service path interface property access value @@ -1520,13 +1469,13 @@ dbus-register-property ;; Add handlers for the three property-related methods. (dbus-register-method bus service path dbus-interface-properties "Get" - 'dbus-property-handler 'dont-register) + #'dbus-property-handler 'dont-register) (dbus-register-method bus service path dbus-interface-properties "GetAll" - 'dbus-property-handler 'dont-register) + #'dbus-property-handler 'dont-register) (dbus-register-method bus service path dbus-interface-properties "Set" - 'dbus-property-handler 'dont-register) + #'dbus-property-handler 'dont-register) ;; Register SERVICE. (unless (or dont-register-service (member service (dbus-list-names bus))) @@ -1673,7 +1622,7 @@ dbus-get-all-managed-objects (if (cadr entry2) ;; "sv". (dolist (entry3 (cadr entry2)) - (setcdr entry3 (cl-caadr entry3))) + (setcdr entry3 (caadr entry3))) (setcdr entry2 nil))))) ;; Fallback: collect the information. Slooow! @@ -1730,7 +1679,7 @@ dbus-managed-objects-handler (append (butlast last-input-event 4) (list object dbus-interface-properties - "GetAll" 'dbus-property-handler)))) + "GetAll" #'dbus-property-handler)))) (dbus-property-handler interface)))) (cdr (assoc object result))))))))) dbus-registered-objects-table) diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index e263c4563f..45c9851365 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -176,8 +176,8 @@ dbus-test03-peer-interface (defun dbus-test-all (&optional interactive) "Run all tests for \\[dbus]." (interactive "p") - (funcall - (if interactive 'ert-run-tests-interactively 'ert-run-tests-batch) "^dbus")) + (funcall (if interactive #'ert-run-tests-interactively #'ert-run-tests-batch) + "^dbus")) (provide 'dbus-tests) ;;; dbus-tests.el ends here -- 2.27.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 05:59:26 2020 Received: (at 41744) by debbugs.gnu.org; 18 Jun 2020 09:59:26 +0000 Received: from localhost ([127.0.0.1]:52796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlrKP-0002S8-Sf for submit@debbugs.gnu.org; Thu, 18 Jun 2020 05:59:26 -0400 Received: from mout.gmx.net ([212.227.17.21]:46609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlrKM-0002Rs-QV for 41744@debbugs.gnu.org; Thu, 18 Jun 2020 05:59:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592474356; bh=z/4SdPNpJ3rjrHWj4xcoSNGtPE165rV4XO3rSn7Q5iI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=AtqqhCBMLQ+BkIf5lTe7Tf79xJ4AuJoser79k3RzWKsryjIkLAXTMkO1DDwqi9bB2 JnOX3UdzpBtc+1FmV9SF/pgu+n67t9IJKfk0IM2n4gIlSa9j1D1QRGz5vLSDur3HXF 4s03sr3KOwA3BXeG4fzSvOee3HUDI253S0ApT4no= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.50.242]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MatRT-1j9lQ83eGZ-00cQrq; Thu, 18 Jun 2020 11:59:15 +0200 From: Michael Albinus To: "Basil L. Contovounesios" Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> <87d05xbgkx.fsf@tcd.ie> Date: Thu, 18 Jun 2020 11:59:14 +0200 In-Reply-To: <87d05xbgkx.fsf@tcd.ie> (Basil L. Contovounesios's message of "Wed, 17 Jun 2020 21:08:46 +0100") Message-ID: <87imfo1yq5.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:TwcrnSSx3yYT0yCLBnPy1CBFXtCDk0ztC1084Wo4eXGqh15Adyg Gk0OrfO/rlkpwNBCG7CHLyN8z0RWI89IjCFDZQaTIqMEx/jB/Qu0ilPZwL0EvdXWDJHOLhy wJJQTGfH+5O8eexpiqHOAF3xYI3rlCbbgAeljZMbsDFYWzNP8+7Lp0No4M9uCTaQNpH8ugm zEEdiBX0KS/Ei0L6sYQTg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:RRoHg5WJ4nE=:SgmB70DNHAjN3JFGiFGaxm NT3bvfgwQsL025EjV2jStaiJePrQpJmAzRKliGD2gJCy74gw2M4PoBzYm5e5OY9rruRbq6vSF i9WqnGVx8KUmY4nlOyMNqmpejMNPML/9Iyx2YwKVpev6iwFbaLgDHZukgCVSEG5UAJQiYSM+2 Cq5hXtoiKEObhp9VaMVfM3iN9fPc7NE3Bfb1ewJETbq3Td30S+6P4GyG2ATZTXc5TzclHUf/2 OsEte0hxGoeVE9oPCxEUMTXUarLDiaZgOq35mcOKttosRsGRxE5vlLFcBX+S2tpHzMYGL54jr RnmsCabBaKV+lUjp0+U17p76GykpziohD7Tv0PsPjCrD/ewthNaa76ddXgyXiYbHLL1+IYdQp nwYPe/2V4rKTB9ktrLxv5ASYpjoI/gc5jrda52Bufnaeanq9w5yKk47pNOVxlwdLtXHfLFhEb q1Mvo5vAZ3hRmHYaIm8Il4YRl+c5qpWtIaNwHDDdrp+xWOtZKDgr65y+TtOHS0htClY6NW6PF DEz0lQfzKu6hDdjTyRe9IpGvaCuzxeltchrLdmgfJPUZKu3NYHzVSHMkfIGfb3pPUnQAVgF/f JJLPbcF30LW/kv5T/lMfSbv8eivadC4qBVR5rCev9xFQL21tHEOqXofL5WlzGE6c4tk+7e6fT ztI6v432AaKdFSO9Df5GWZ/1+67BNMFuen3XhV5gyzH56xycJbM5Vk0ij4Q1v7vSD2f/UPykZ gTAvyuq9cN9AwAUK8xSZya2kOJzA+yCeSVBLILLkGVzjGG0BsYbmJPLqFoEKEd5jSXSVoSQXc Wdi2B8/GufhSlH/PgJuYjTqOa2J5i+z3mbay0d18aGucsu9tZ7FBPXo+ilsjQvOvKjf4ZUXmh BklOZa5JJx7lB6vu8VFOwGfGfNhHCWQXYRt1KZwKg7Lkfl5sApApG03/0hNSPux+9ELkJqP6h xGZ/ibEB3TV+zTOYHNjCFQwpbihbj05xF5DWDoDHIaU2t/XYIcBaycU/qKnikH8uDWCoPmHA/ IfEyTMy4iF67Y6VBh0nBC/OxRpiPViXaCUA6n5FYhEp+lN+5mbegRkldMw0ooShyE8v3Fbw2l gXyLFCjlCpmQaB4X+V3hrCywO3zq+huUWDaABdF8SeTUC//JuEMXlCfbEOQPyAwi0yZ0yNmGm U5BaXiduc8sDbJmUPCDzYPOW++AEoST5CrMNUE6F1+zZNWJV5iHBhSZ4T9t0BLJmBSkTpB85a uPnWSg8f7sKDG8d+x X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41744 Cc: 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "Basil L. Contovounesios" writes: Hi Basil, > The doc patch for emacs-27 has now propagated to master, so here's a > rebased version of the patch for master. WDYT? > > --- a/lisp/net/dbus.el > +++ b/lisp/net/dbus.el > @@ -169,7 +166,6 @@ dbus-ignore-errors > > (define-obsolete-variable-alias 'dbus-event-error-hooks > 'dbus-event-error-functions "24.3") I believe we should remove this variable now. > @@ -339,8 +335,8 @@ dbus-call-method > > +(define-obsolete-function-alias 'dbus-call-method-non-blocking > + #'dbus-call-method "24.3") Dito. Otherwise, it looks good to me (but I haven't tested comprehensively). For a while, I have on my wishlist to declare a D-Bus event as a defstruct, like this: (cl-defstruct (dbus-event (:type list) :named) "A D-Bus event, coming from or sent to other applications." bus-name message-type serial-number service-name path-name interface-name member-name handler) But I don't know whether it is worth the effort. > Thanks, > > -- > Basil Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 11:35:13 2020 Received: (at control) by debbugs.gnu.org; 18 Jun 2020 15:35:13 +0000 Received: from localhost ([127.0.0.1]:54119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlwZM-0004p2-S5 for submit@debbugs.gnu.org; Thu, 18 Jun 2020 11:35:13 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:34781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlwZF-0004o7-3K for control@debbugs.gnu.org; Thu, 18 Jun 2020 11:35:08 -0400 Received: by mail-qt1-f181.google.com with SMTP id u17so4776276qtq.1 for ; Thu, 18 Jun 2020 08:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version; bh=UGl7EDO1cN2jeWw1Gew/DxYBMLcIg7GofZGlvTVo7Gk=; b=lXXfAYGpkxNZhuPcB/3FLuVq8DX+EkdrZWhaXj/pbCV1ZUs/fpOySY1o9yRO8Mshh+ /MjUOvYm6v3k1eYzYgjJYeoMYjPyOJ2P3xNvqHQsWn+Zg1V5OuG3w6fkxDaCCLudTxlc gxgEVpUmIlEWvinrdRo0/2ng4jD9mYDktfqbz/8m2tWqYYhYnTf/i1XJTbPkgD1LDnUb hbbZNqp/sUKb+C1O+IIe/bbkMFsaIWy890CprpuKzUASlcXWkDgihTPnqXGusbZLmVx4 5JQJ7y6XrnFxFCGZcLSraFoFRClfohzSUxTzaN30EghgJudOyCFEMWkSeJNscBPy9qTn 4WvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:message-id :user-agent:mime-version; bh=UGl7EDO1cN2jeWw1Gew/DxYBMLcIg7GofZGlvTVo7Gk=; b=q26FGVO2d0hobJuqbk+Yx4dalXq0M+dCcYvI5uYIcwhFZvimeqgO8/fw5g+G7g4Ir7 zlh6E95+42A1ncLh6NqgPqzZfj05Pj1fKciXJGbXhDyC7c94FLrqNRLLap1BeyJ70vx/ 1yxNjv5BnW5lql4f+is1u26SMpCJs5lw+X8/ciQ9j2RIrxhIu8/8egERAXk5T2V+Cr6c 2MP9XM9PayCTIIqZIzo/7wcV0EJc2b9ucdvj1kkg7ShTXpzCGQYnHuAsCMSJSgIEdEKe M8ioaJMFDpkbT8breHqrDWKkbdsHS8nhndFO0vvE5UJYTqMwQ9tRuG7xwfvnbOWF6CQD mvug== X-Gm-Message-State: AOAM531XpMZDAuA5Gqjb0myIxMfaS4p5eg+yOx9odP2de6yhy74c4oI4 5G7yfTzOO4cLErxAtL3no6cflg== X-Google-Smtp-Source: ABdhPJxNvA8d/bnEt1R8SvYFMba8FE36Ecy025CjeTFuNRqsR9WvcP4PfGbGyyCJ88NDWp9S6MAoPg== X-Received: by 2002:aed:2622:: with SMTP id z31mr5094882qtc.273.1592494498072; Thu, 18 Jun 2020 08:34:58 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id j27sm2489002qta.32.2020.06.18.08.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 08:34:57 -0700 (PDT) From: "Basil L. Contovounesios" To: Michael Albinus Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> <87d05xbgkx.fsf@tcd.ie> <87imfo1yq5.fsf@gmx.de> Date: Thu, 18 Jun 2020 16:34:54 +0100 Message-ID: <87366speu9.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: 41744-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 41744 fixed close 41744 28.1 quit Michael Albinus writes: >> --- a/lisp/net/dbus.el >> +++ b/lisp/net/dbus.el >> @@ -169,7 +166,6 @@ dbus-ignore-errors >> >> (define-obsolete-variable-alias 'dbus-event-error-hooks >> 'dbus-event-error-functions "24.3") > > I believe we should remove this variable now. > >> @@ -339,8 +335,8 @@ dbus-call-method >> >> +(define-obsolete-function-alias 'dbus-call-method-non-blocking >> + #'dbus-call-method "24.3") > > Dito. Done. > Otherwise, it looks good to me (but I haven't tested comprehensively). Thanks. I pushed it to master so we can get some help with the comprehensive testing. ;) Various dbus.el cleanups (bug#41744) 97d1f672ac 2020-06-18 12:20:48 +0100 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=97d1f672ac1529ac07a999405f630cb19a1010eb > For a while, I have on my wishlist to declare a D-Bus event as a > defstruct, like this: > > (cl-defstruct (dbus-event (:type list) :named) > "A D-Bus event, coming from or sent to other applications." > bus-name message-type serial-number > service-name path-name interface-name member-name handler) > > But I don't know whether it is worth the effort. I'm not yet familiar with cl-defstruct so I'll put it on my wishlist too. :) Thanks again, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 12:59:49 2020 Received: (at 41744-done) by debbugs.gnu.org; 18 Jun 2020 16:59:49 +0000 Received: from localhost ([127.0.0.1]:54228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlxtF-0002qp-Kr for submit@debbugs.gnu.org; Thu, 18 Jun 2020 12:59:49 -0400 Received: from mout.gmx.net ([212.227.17.21]:32939) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlxtD-0002qb-3n for 41744-done@debbugs.gnu.org; Thu, 18 Jun 2020 12:59:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592499579; bh=rLOZjSW/O2ss0kozYKTn4BDeA1APUjSeOFkFTNHReOA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=HvvKNr3JuGvumdJDeoWWYwY0IO5VwEqmYPsQzNaYSqjNas9H47KgyQzsXh4W1mXnA oPL/OfRTQXdKG9bLPmM/hkDtW1vflmLUsp2uklrkMcsU9bvVlfutpnQphJX2cNDEJw +6pGdurj0kqL3blO1H05IA/7a5Au2NtJYYLu5hjc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.50.242]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MaJ3t-1jQs5W29I5-00WD3m; Thu, 18 Jun 2020 18:59:39 +0200 From: Michael Albinus To: "Basil L. Contovounesios" Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> <87d05xbgkx.fsf@tcd.ie> <87imfo1yq5.fsf@gmx.de> <87366speu9.fsf@tcd.ie> Date: Thu, 18 Jun 2020 18:59:38 +0200 In-Reply-To: <87366speu9.fsf@tcd.ie> (Basil L. Contovounesios's message of "Thu, 18 Jun 2020 16:34:54 +0100") Message-ID: <87wo44ia2t.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:mnJJlh8/3OqUH7udD51diWAlk+tPAkDittCOmKcXHhXZAw55r+y y6eE6EZ46EWuxIOK6IPFEdvnNS6mKlb0Qb7MERtrBDD8Pgqvz/tAjCeZr4yRho5STIOzKi2 HEPoOws+JfF9QoawF0Acnqb2ZwJpwwG+UrvMmnYpc+IN0fccU5Oa5lWhqBpmqwlfJEClrgV ngo/VDZ3G/LF2YYangxOg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ChrKmj0467I=:Z8BPRARm1MKJ/nviMx4vhg 8u28WGvvyQyuTUnvAXclyLPhVyUuT4U8C1vUR4EWFC8yUHiK8pAfuHhfxjc3zSuPBvqCcalU/ l6AigMgP69fSYJUhWQMWEb/ZHjnOJqRIw1AgesEM4GZQJOtwKgQUQbhrSv0yYGy96nBJAXsU0 76ckEkmxbOiIJEdoKl8EBMhg1htjVboVYEplhAPfCKlsbnB5RqlC5/epu/vqh3cexnYyoy0r7 qlGti2+0YWvpgrWoa/TXygFnF0rYk/JLITx/hL5S+8kYOU3KIPhtZ5tvBGd2O9Q75WPopvXv6 8FvL+eTs0T7k92lJfhRTQP6KAjCNyftMVhSrvc6Yc6fwqjQchid3uigrqVksoat6A+gnQ12q5 XjHP8gzRuA0SJPGlHCWipfdEd5P/uvQGW8iExHRvWIk/VQbwTUQry8LdeI/1TzpUoq0xhpJfe BSGhGaRu3rOXBEtdBg5DzRHecxEj3jb9qfXAoeznX5B/1xDOyPvdc2nV0A+BddS/qdG2RiDzA 8NwwuPR1DJEYsYAeSkiHvopAkMhAMSh2KYGOJ27PiUiUm7qmetNvz8wcw+xC8fitFzWqqOGWf UiTZMorvWoGhn1rd33YxXg2aoRxkMKzikiisWoBFVAOoXYAjjXclJhYimHf8P3D6Xoz9M4g+d l6Mu9Ml59LNKj/AVmT4F8bmtkdpBvgaCg/AUrckycLIxFhqtTa+nwi3METC8bnMFaVozWF3Td F5gIsN2Alq/bkNrlTmL1iaCiUfUgYXXGTNkmjGfwSgM88PpTB/wd+gs1rOtp2uuSEzZARo0B5 U2zIuv5cA8vuttesGpzVE+aYscXw8AXm6xiUVDVVRqsAZBFG0PCnj8T4e8+Hh/siCjpAUqi+g xCcHhwlZwB+QWzJzfgqrYI97Bo6Cm9voyliLNJCuuD3UlBAt84zT8JsoRBZSecw3/f9IMAkti ODMMDyQOcRiQ7K3VPeqWrvsshy4psGRrzdTtaon3+ofiI5vOM5mx7vN/l4ExSluztiS1w9vKz QoggmP5JPVh70CxMbIcPk9y5yqty3PHBm3uqOG6G4jpMEBfDo7dR9ivc22IYemoe+ManiU935 NBO3Z8uInoyL9vN+PxRIlT+aAt2FdXIS4oiFjHHS2CLfsvocgXIt3s4GiQZwuPBMYob5IC1DI NSe51FFvR7iDI4yY0rRyteqgzLooMXi0VuW1q8lCnemI1BwPvRTShd7EmxyZyIo9VpghgJOT5 fTeXtblhVJNQawLkp X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41744-done Cc: 41744-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "Basil L. Contovounesios" writes: >>> --- a/lisp/net/dbus.el >>> +++ b/lisp/net/dbus.el >>> @@ -169,7 +166,6 @@ dbus-ignore-errors >>> >>> (define-obsolete-variable-alias 'dbus-event-error-hooks >>> 'dbus-event-error-functions "24.3") >> >> I believe we should remove this variable now. >> >>> @@ -339,8 +335,8 @@ dbus-call-method >>> >>> +(define-obsolete-function-alias 'dbus-call-method-non-blocking >>> + #'dbus-call-method "24.3") >> >> Dito. > > Done. Thanks. The paragraph in etc/NEWS must be moved somewhere else; will do it next time I'll trim that file. > Thanks again, Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 13:06:08 2020 Received: (at 41744) by debbugs.gnu.org; 18 Jun 2020 17:06:08 +0000 Received: from localhost ([127.0.0.1]:54243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlxzL-00032r-J9 for submit@debbugs.gnu.org; Thu, 18 Jun 2020 13:06:08 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:41175) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlxzH-00032I-7D for 41744@debbugs.gnu.org; Thu, 18 Jun 2020 13:06:06 -0400 Received: by mail-qt1-f178.google.com with SMTP id w90so4997435qtd.8 for <41744@debbugs.gnu.org>; Thu, 18 Jun 2020 10:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=H1VtfaS+Xc+2iUJ/VPYoKtb8/MzugK2j4XOcH+c12d8=; b=jgZ+Zllml7XRwp1uJL+SP9l1H5rwcvrEjGSYgrB1v/4qfjlIlPf9e7SYUCLTAE2Gol tTVDVggvcywYHi4NJfTlDBNtBzpWLssms0gxH4TIvMoGGQWajumgThLOvz2chV7nSvdK dEHQx+4Ccy7ghWWkdMZ7OBipEU0ZBWCcNZ9Mph85rjezUF7XAuSuMlT8NK2trY3sPmMr jLkR9hgWingGs2a94QzKXLC49cKjHWE/o97AL/OFXndPBwsTSGNPrpPYqyyYz3nzYWGd IKPowDpuNX+/zWT8nh15anBrcLnhhq3k5fOLmYTNceiCP2yWuAXU7MPziSofpFZgXprc 862A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=H1VtfaS+Xc+2iUJ/VPYoKtb8/MzugK2j4XOcH+c12d8=; b=uGvaSUIg23vutP73LDXSVRi8KTYgqyNOo18jCOvZV8B2Ibv4p+JnHXB/hdhluCjyBo nDWYm0tQkEYTz5gZ1iUtFcVZQ+ZBXkxJmCrQtfeUIbLgKj8u32/nIO+S4JmSTHltlo4f /A0zwvZ14SZIN/8+Jln/ruMxwivEFo8RdXkmf+k8FnmoWM1TmY35DnyId6n7HbOPvTJC x9Yg2Ovi2/NK/9m837GoPSnheg923DzkBhNChSYdvN4NtwXqqTe2G2EqNtXsHy7weWQ7 nN8gawv9Sf3EBmw4ijii67DjIUgBkwDjPoCLqZBPKXw6ETOf5DzmvdRp3ns8k/qL6deS dQ+Q== X-Gm-Message-State: AOAM533bsxLE7sYKSFYNUvxq53tIWAoim39kxa8tRfiB893IMEqoc1Gp n4XKH9Sscgq7tufyvz90/QMopQ== X-Google-Smtp-Source: ABdhPJwWVjSwJTOyuGORuFLk4oR5n6TgXDEwkLaUIMDFt75qTAtkoeUFvCn0EWzaGUBo9ggFzSg2vA== X-Received: by 2002:aed:3fa4:: with SMTP id s33mr5689683qth.148.1592499957749; Thu, 18 Jun 2020 10:05:57 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id o62sm3386740qkd.53.2020.06.18.10.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 10:05:54 -0700 (PDT) From: "Basil L. Contovounesios" To: Michael Albinus Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> <87d05xbgkx.fsf@tcd.ie> <87imfo1yq5.fsf@gmx.de> <87366speu9.fsf@tcd.ie> <87wo44ia2t.fsf@gmx.de> Date: Thu, 18 Jun 2020 18:05:52 +0100 In-Reply-To: <87wo44ia2t.fsf@gmx.de> (Michael Albinus's message of "Thu, 18 Jun 2020 18:59:38 +0200") Message-ID: <87mu50jocv.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41744 Cc: 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: > The paragraph in etc/NEWS must be moved somewhere else; will do > it next time I'll trim that file. Sorry about that. Where is the correct place? Under "Incompatible Lisp Changes"? Let me know if you'd rather I fixed it. Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 14:02:17 2020 Received: (at 41744) by debbugs.gnu.org; 18 Jun 2020 18:02:18 +0000 Received: from localhost ([127.0.0.1]:54357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlyrh-0006h9-Jp for submit@debbugs.gnu.org; Thu, 18 Jun 2020 14:02:17 -0400 Received: from mout.gmx.net ([212.227.15.18]:46465) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlyrf-0006gu-3s for 41744@debbugs.gnu.org; Thu, 18 Jun 2020 14:02:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592503327; bh=xu34Q/WKT0fe4rX0HijT80q6k71sODCDqDLFdaDwSb4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=WkCnSQmZzZvGNnImJW2xk2yBRH854rO3faNzDTMRGCGV0iVHYu5HBcaxTZ8nxJUZA +EOX6xh3gq//8PhjK8J0Tv5C5xVej87U4ylYf0GHv9iwB+DnxceuY3RSt+3AAIjT2u o6vpNx5rPVNeOz4AEsC46WiVDd5fGGy1EXT9+xkE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.86.50.242]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N4QwW-1impXF3KRa-011PjZ; Thu, 18 Jun 2020 20:02:07 +0200 From: Michael Albinus To: "Basil L. Contovounesios" Subject: Re: bug#41744: 27.0.91; Various D-Bus cleanups References: <87mu5fpyh1.fsf@tcd.ie> <874krln7fg.fsf@gmx.de> <87d05xbgkx.fsf@tcd.ie> <87imfo1yq5.fsf@gmx.de> <87366speu9.fsf@tcd.ie> <87wo44ia2t.fsf@gmx.de> <87mu50jocv.fsf@tcd.ie> Date: Thu, 18 Jun 2020 20:02:06 +0200 In-Reply-To: <87mu50jocv.fsf@tcd.ie> (Basil L. Contovounesios's message of "Thu, 18 Jun 2020 18:05:52 +0100") Message-ID: <87sgesi76p.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:W0VTvC5sjBIESfqHR58iOgKy6ww76Rsf+bT1MetNe1qrb5goA3V ouqPbJvcu6KBV9G2YN6qq7s45ejAqRxrI+Os4pQrUrC2voLLs48q7ZJawAmpKxNQxtKPMrz mrw09VZldIKKAGXGOWDYsLbKj6NqspQW4ampVb3U89YrFh5I/teZFOj+FhzA2xfMOQbM3q/ u3qsDX+vnXjfw+jPaxy1Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sKFIOlbBnz8=:/H+3/n764JILTzsFBcD+pS rhKPdRoD7sY1n/BZHd+nde8qEVNTJGJy7QEiCPe8jl8BpWCCeOyZIc6t+ugrlYhcRR/MjuxuB p2JAAslwfxFMqy6ribp6yD/ZMA6wrsAMvOM/aw3sfoyAzkSOe9LgN4monxRX6lF5zKlWI6Krx 7iN5eHuArM3pKoZqYOKsToWO17ojarWopJ3Ygrv0AqRa2Mcs57X0qmsaNzT8upBEuKDfO4ihi SggmFvjhRDOi+9BsFJP4ROQh5ZrbfLgI1uowedjAM8ULEPS4L1lYxl0OtzuEMs35/PXxVBcjW ZHW25irwnLUTJ+GM0d7QtJtgEm7Da90ojaOy++obAOxwkAqWhvMXW8cL2IBAeERELMETt0mgN jutLMNb6E4MUd9EZarMHFFx1CM+JmyWwYDqLKC3LfzDTM7JwZNuQ4H87ZT4XeKUmNICsI/nL5 KaNT4+pWRRnZWPnz+8Hv3sM/XOM2tXlKG9qFzTMlMBGzQ3J1uz0NRgIoeWGQxDvyTPomfRoVL h4DovBe95p6sCr5i4XHuLM+lgK7dprQLvdvhD6SuvTLZoTUcTO3d+FBvgQThXxOqW+CUl+BeV sVp6BvtP5TSx+MRIF3QUXnDPKTpSESJJ6TFIXOXFVDry2KCk6tqqKqhTDioGVTFbteb6lednr TtUPlGeNq7Hu6kDnZj8+XQ/fadgaAX4R/bfeT7jCkAA6latqJ17ker8ztmA7gzlYCZygxRqc3 RNRrvU1lJOjgUVkuYVt/LeuJVdaD+tEYLXLSzkS4WCPt+K5Cflxv37SrCxLwy0J1i9UWp8V/P ri/SbX6hIfI6aZYoKYiN8BcdFYiSxIa6jrYlLV6lQMraK07ZsdXcJHx13Tcybe03YnpXZH96a uHc99J0nqhVy8RBa6+hNAujlkSKZpPIE7Jus8BlDmsrZaG8XYoDPGTRO4ozIS8ngNt4ebx34t /qVSkWYyfpmljeK8itBDSOR9f3g7R3Rr647/rkDxs5LgJlSCZoYcO+rhQ72azdmloLK09ZLFS ++sN4+4RCdzsbTzNiUv/JviMntg1XH8uJa8cqvD1w49dvfdBmY2yJZS+QvaJ+M23KuYcov3D2 SfBzatKBCJZiPx9ovH+mzHe3vbENjwX3R2toRBcLKMWpeUBLs+yr1l80jNn1zMuB0tBCLZJg3 lcRhDw7PTvSwxDXAPtRPHosiaM6e5/weGkx4HAYQnAdX+5Uyv/we50PxyyP+pZbAb6d3eF7sd kqVrNIkNrdsdlqVol X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 41744 Cc: 41744@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "Basil L. Contovounesios" writes: >> The paragraph in etc/NEWS must be moved somewhere else; will do >> it next time I'll trim that file. > > Sorry about that. Where is the correct place? Under "Incompatible Lisp > Changes"? Let me know if you'd rather I fixed it. Pushed to master. > Thanks, Best regards, Michael. From unknown Thu Jun 19 14:04:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 17 Jul 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator