aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorGlenn Morris2020-06-17 08:47:53 -0700
committerGlenn Morris2020-06-17 08:47:53 -0700
commit21b03faed44913ba0b0e3d54d2ffdb0ac067fae8 (patch)
tree305caea08574a7d747e692e1ed1c023606502671 /doc
parent9682aa2f2493c89af1894ad2d52543d57f4958a5 (diff)
parent229995ba2cd9f6d0a749a38c106cbfbfd04119a8 (diff)
downloademacs-21b03faed44913ba0b0e3d54d2ffdb0ac067fae8.tar.gz
emacs-21b03faed44913ba0b0e3d54d2ffdb0ac067fae8.zip
Merge from origin/emacs-27
229995ba2c (origin/emacs-27) Fix some Texinfo markup 01e86b9fdf Fix recentf typo in Emacs manual cd4f75bb86 Rename default function to next-error-buffer-unnavigated-c... 1dff0a8949 * lisp/image-mode.el (image-toggle-display-image): Fix fit... a71d1787f1 * doc/misc/tramp.texi (Predefined connection information):... 079b0dc430 Delete, don't kill, dir dir fragments in icomplete-fido-ba... 6cdecc2659 Revert markup change in with-coding-priority docs 22f4fba8a9 * lisp/emulation/cua-rect.el (cua--rectangle-region-insert... 6b9eac6759 * lisp/simple.el (shell-command-on-region): Fix docstring. 43ad7dc1af Clean up D-Bus documentation (bug#41744) c43e5ed60d * lisp/image-mode.el (image-transform-original): New comma... 6eb18a950d Move tab-bar and tab-line faces to faces.el (part of bug#4... # Conflicts: # etc/NEWS # lisp/simple.el
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/files.texi6
-rw-r--r--doc/emacs/frames.texi21
-rw-r--r--doc/emacs/misc.texi6
-rw-r--r--doc/lispref/control.texi2
-rw-r--r--doc/lispref/debugging.texi2
-rw-r--r--doc/lispref/errors.texi5
-rw-r--r--doc/lispref/files.texi2
-rw-r--r--doc/lispref/frames.texi2
-rw-r--r--doc/lispref/nonascii.texi6
-rw-r--r--doc/lispref/os.texi2
-rw-r--r--doc/lispref/text.texi2
-rw-r--r--doc/misc/dbus.texi826
-rw-r--r--doc/misc/efaq-w32.texi14
-rw-r--r--doc/misc/efaq.texi2
-rw-r--r--doc/misc/emacs-gnutls.texi2
-rw-r--r--doc/misc/gnus-faq.texi5
-rw-r--r--doc/misc/message.texi4
-rw-r--r--doc/misc/tramp.texi6
18 files changed, 462 insertions, 453 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 56ce7fdea19..5998326ffef 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1003,7 +1003,7 @@ variable @code{auto-revert-remote-files} to non-@code{nil}.
1003@vindex auto-revert-use-notify 1003@vindex auto-revert-use-notify
1004@vindex auto-revert-interval 1004@vindex auto-revert-interval
1005 By default, Auto Revert mode works using @dfn{file notifications}, 1005 By default, Auto Revert mode works using @dfn{file notifications},
1006whereby changes in the filesystem are reported to Emacs by the OS. 1006whereby changes in the filesystem are reported to Emacs by the OS@.
1007You can disable use of file notifications by customizing the variable 1007You can disable use of file notifications by customizing the variable
1008@code{auto-revert-use-notify} to a @code{nil} value, then Emacs will 1008@code{auto-revert-use-notify} to a @code{nil} value, then Emacs will
1009check for file changes by polling every five seconds. You can change 1009check for file changes by polling every five seconds. You can change
@@ -2098,8 +2098,8 @@ recently-opened files, reading file names from a buffer.
2098 If you enable Recentf mode, with @kbd{M-x recentf-mode}, the 2098 If you enable Recentf mode, with @kbd{M-x recentf-mode}, the
2099@samp{File} menu includes a submenu containing a list of recently 2099@samp{File} menu includes a submenu containing a list of recently
2100opened files. @kbd{M-x recentf-save-list} saves the current 2100opened files. @kbd{M-x recentf-save-list} saves the current
2101@code{recent-file-list} to a file, and @kbd{M-x recentf-edit-list} 2101@code{recentf-list} to a file, and @kbd{M-x recentf-edit-list} edits
2102edits it. 2102it.
2103 2103
2104@c FIXME partial-completion-mode (complete.el) is obsolete. 2104@c FIXME partial-completion-mode (complete.el) is obsolete.
2105 The @kbd{M-x ffap} command generalizes @code{find-file} with more 2105 The @kbd{M-x ffap} command generalizes @code{find-file} with more
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 8f448e1aedc..e0eabe38d06 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -1362,15 +1362,16 @@ a recently used tab.
1362@findex tab-next 1362@findex tab-next
1363Switch to the next tab. If you repeat this command, it cycles through 1363Switch to the next tab. If you repeat this command, it cycles through
1364all the tabs on the selected frame. With a positive numeric argument 1364all the tabs on the selected frame. With a positive numeric argument
1365N, it switches to the next Nth tab; with a negative argument −N, it 1365@var{n}, it switches to the next @var{n}th tab; with a negative
1366switches back to the previous Nth tab. 1366argument @minus{}@var{n}, it switches back to the previous @var{n}th
1367tab.
1367 1368
1368@item S-C-@key{TAB} 1369@item S-C-@key{TAB}
1369@kindex S-C-TAB 1370@kindex S-C-TAB
1370@findex tab-previous 1371@findex tab-previous
1371Switch to the previous tab. With a positive numeric argument N, it 1372Switch to the previous tab. With a positive numeric argument @var{n},
1372switches to the previous Nth tab; with a negative argument −N, it 1373it switches to the previous @var{n}th tab; with a negative argument
1373switches back to the next Nth tab. 1374@minus{}@var{n}, it switches back to the next @var{n}th tab.
1374 1375
1375@item C-x t @key{RET} @var{tabname} @key{RET} 1376@item C-x t @key{RET} @var{tabname} @key{RET}
1376Switch to the tab by its name, with completion on all tab names. 1377Switch to the tab by its name, with completion on all tab names.
@@ -1392,7 +1393,7 @@ to select the tab by its number.
1392@findex tab-recent 1393@findex tab-recent
1393Switch to the recent tab. The key combination is the modifier key 1394Switch to the recent tab. The key combination is the modifier key
1394defined by @code{tab-bar-select-tab-modifiers} and the key @kbd{0}. 1395defined by @code{tab-bar-select-tab-modifiers} and the key @kbd{0}.
1395With a numeric argument N, switch to the Nth recent tab. 1396With a numeric argument @var{n}, switch to the @var{n}th recent tab.
1396@end table 1397@end table
1397 1398
1398 The following commands can be used to operate on tabs: 1399 The following commands can be used to operate on tabs:
@@ -1406,9 +1407,9 @@ variable @code{tab-bar-tab-name-function}.
1406 1407
1407@item C-x t m 1408@item C-x t m
1408@findex tab-move 1409@findex tab-move
1409Move the current tab N positions to the right with a positive numeric 1410Move the current tab @var{n} positions to the right with a positive
1410argument N. With a negative argument −N, move the current tab 1411numeric argument @var{n}. With a negative argument @minus{}@var{n},
1411N positions to the left. 1412move the current tab @var{n} positions to the left.
1412@end table 1413@end table
1413 1414
1414@findex tab-bar-history-mode 1415@findex tab-bar-history-mode
@@ -1621,7 +1622,7 @@ again.
1621enable mouse support. You must have the gpm server installed and 1622enable mouse support. You must have the gpm server installed and
1622running on your system in order for this to work. Note that when 1623running on your system in order for this to work. Note that when
1623this mode is enabled, you cannot use the mouse to transfer text 1624this mode is enabled, you cannot use the mouse to transfer text
1624between Emacs and other programs which use GPM. This is due to 1625between Emacs and other programs which use GPM@. This is due to
1625limitations in GPM and the Linux kernel. 1626limitations in GPM and the Linux kernel.
1626 1627
1627@iftex 1628@iftex
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 1336da12b07..e7547ebff7c 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1968,12 +1968,12 @@ evaluate, @emph{not} as a list of files to visit.
1968@item -f @var{server-file} 1968@item -f @var{server-file}
1969@itemx --server-file=@var{server-file} 1969@itemx --server-file=@var{server-file}
1970Specify a server file (@pxref{TCP Emacs server}) for connecting to an 1970Specify a server file (@pxref{TCP Emacs server}) for connecting to an
1971Emacs server via TCP. Alternatively, you can set the 1971Emacs server via TCP@. Alternatively, you can set the
1972@env{EMACS_SERVER_FILE} environment variable to point to the server 1972@env{EMACS_SERVER_FILE} environment variable to point to the server
1973file. (The command-line option overrides the environment variable.) 1973file. (The command-line option overrides the environment variable.)
1974 1974
1975An Emacs server usually uses a local socket to listen for connections, 1975An Emacs server usually uses a local socket to listen for connections,
1976but also supports connections over TCP. To connect to a TCP Emacs 1976but also supports connections over TCP@. To connect to a TCP Emacs
1977server, @command{emacsclient} needs to read a @dfn{server file} 1977server, @command{emacsclient} needs to read a @dfn{server file}
1978containing the connection details of the Emacs server. The name of 1978containing the connection details of the Emacs server. The name of
1979this file is specified with this option, either as a file name 1979this file is specified with this option, either as a file name
@@ -2882,7 +2882,7 @@ widget. The URL normally defaults to the URL at or before point, but
2882if there is an active region (@pxref{Mark}), the default URL comes 2882if there is an active region (@pxref{Mark}), the default URL comes
2883from the region instead, after removing any whitespace from it. The 2883from the region instead, after removing any whitespace from it. The
2884command then creates a new buffer with the embedded browser showing 2884command then creates a new buffer with the embedded browser showing
2885the specified URL. The buffer is put in the Xwidget-WebKit mode 2885the specified URL@. The buffer is put in the Xwidget-WebKit mode
2886(similar to Image mode, @pxref{Image Mode}), which provides 2886(similar to Image mode, @pxref{Image Mode}), which provides
2887one-key commands for scrolling the widget, changing its size, and 2887one-key commands for scrolling the widget, changing its size, and
2888reloading it. Type @w{@kbd{C-h b}} in that buffer to see the key 2888reloading it. Type @w{@kbd{C-h b}} in that buffer to see the key
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 58f93366fe9..01ae94ea7dd 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -835,7 +835,7 @@ the second and subsequent occurrences do not expand to re-binding,
835but instead expand to an equality test using @code{eq}. 835but instead expand to an equality test using @code{eq}.
836 836
837The following example features a @code{pcase} form 837The following example features a @code{pcase} form
838with two clauses and two @var{seqpat}, A and B. 838with two clauses and two @var{seqpat}, A and B@.
839Both A and B first check that @var{expval} is a 839Both A and B first check that @var{expval} is a
840pair (using @code{pred}), 840pair (using @code{pred}),
841and then bind symbols to the @code{car} and @code{cdr} 841and then bind symbols to the @code{car} and @code{cdr}
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index 24ec656028f..29a0ab71ea4 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -402,7 +402,7 @@ assumptions are false if the debugger is running interpreted.
402@cindex backtrace buffer 402@cindex backtrace buffer
403 403
404Debugger mode is derived from Backtrace mode, which is also used to 404Debugger mode is derived from Backtrace mode, which is also used to
405show backtraces by Edebug and ERT. (@pxref{Edebug}, and @ref{Top,the 405show backtraces by Edebug and ERT@. (@pxref{Edebug}, and @ref{Top,the
406ERT manual,, ert, ERT: Emacs Lisp Regression Testing}.) 406ERT manual,, ert, ERT: Emacs Lisp Regression Testing}.)
407 407
408@cindex stack frame 408@cindex stack frame
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index dc6877c9eca..cd8694be8a3 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -79,9 +79,8 @@ The message is @samp{Symbol's chain of variable indirections contains
79a loop}. @xref{Variable Aliases}. 79a loop}. @xref{Variable Aliases}.
80 80
81@item dbus-error 81@item dbus-error
82The message is @samp{D-Bus error}. This is only defined if Emacs was 82The message is @samp{D-Bus error}. @xref{Errors and Events,,, dbus,
83compiled with D-Bus support. @xref{Errors and Events,,, dbus, D-Bus 83D-Bus integration in Emacs}.
84integration in Emacs}.
85 84
86@item end-of-buffer 85@item end-of-buffer
87The message is @samp{End of buffer}. @xref{Character Motion}. 86The message is @samp{End of buffer}. @xref{Character Motion}.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 574c7e5aead..92cbc2a1c91 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1197,7 +1197,7 @@ inconclusive, the function returns @code{t} on Cygwin and @code{nil}
1197on macOS. 1197on macOS.
1198 1198
1199Currently this function always returns @code{nil} on platforms other 1199Currently this function always returns @code{nil} on platforms other
1200than MS-DOS, MS-Windows, Cygwin, and macOS. It does not detect 1200than MS-DOS, MS-Windows, Cygwin, and macOS@. It does not detect
1201case-insensitivity of mounted filesystems, such as Samba shares or 1201case-insensitivity of mounted filesystems, such as Samba shares or
1202NFS-mounted Windows volumes. On remote hosts, it assumes @code{t} for 1202NFS-mounted Windows volumes. On remote hosts, it assumes @code{t} for
1203the @samp{smb} method. For all other connection methods, runtime 1203the @samp{smb} method. For all other connection methods, runtime
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 966f620558b..a82b585d93d 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -2173,7 +2173,7 @@ it on an undecorated frame.
2173@item override-redirect 2173@item override-redirect
2174@cindex override redirect frames 2174@cindex override redirect frames
2175If non-@code{nil}, this means that this is an @dfn{override redirect} 2175If non-@code{nil}, this means that this is an @dfn{override redirect}
2176frame---a frame not handled by window managers under X. Override 2176frame---a frame not handled by window managers under X@. Override
2177redirect frames have no window manager decorations, can be positioned 2177redirect frames have no window manager decorations, can be positioned
2178and resized only via Emacs' positioning and resizing functions and are 2178and resized only via Emacs' positioning and resizing functions and are
2179usually drawn on top of all other frames. Setting this parameter has 2179usually drawn on top of all other frames. Setting this parameter has
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 51831a05cc2..c6c78ec096e 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1823,9 +1823,9 @@ than all the rest.
1823 1823
1824@defmac with-coding-priority coding-systems &rest body 1824@defmac with-coding-priority coding-systems &rest body
1825This macro executes @var{body}, like @code{progn} does 1825This macro executes @var{body}, like @code{progn} does
1826(@pxref{Sequencing}), with @var{coding-systems} at the front of the 1826(@pxref{Sequencing, progn}), with @var{coding-systems} at the front of
1827priority list for coding systems. @var{coding-systems} should be a 1827the priority list for coding systems. @var{coding-systems} should be
1828list of coding systems to prefer during execution of @var{body}. 1828a list of coding systems to prefer during execution of @var{body}.
1829@end defmac 1829@end defmac
1830 1830
1831@node Explicit Encoding 1831@node Explicit Encoding
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 67e44678299..91894522300 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1989,7 +1989,7 @@ The result is @code{nil} if either argument is a NaN.
1989This returns the time difference @var{t1} @minus{} @var{t2} between 1989This returns the time difference @var{t1} @minus{} @var{t2} between
1990two time values, as a Lisp time value. The result is exact and its clock 1990two time values, as a Lisp time value. The result is exact and its clock
1991resolution is no worse than the worse of its two arguments' resolutions. 1991resolution is no worse than the worse of its two arguments' resolutions.
1992The result is floating-point only if it is infinite or a NaN. 1992The result is floating-point only if it is infinite or a NaN@.
1993If you need the difference in units 1993If you need the difference in units
1994of elapsed seconds, you can convert it with @code{time-convert} or 1994of elapsed seconds, you can convert it with @code{time-convert} or
1995@code{float-time}. @xref{Time Conversion}. 1995@code{float-time}. @xref{Time Conversion}.
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index d765c95f773..10e8246a5fa 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -5219,7 +5219,7 @@ Signaled when encountering invalid JSON syntax.
5219@end table 5219@end table
5220 5220
5221 Only top-level values (arrays and objects) can be serialized to 5221 Only top-level values (arrays and objects) can be serialized to
5222JSON. The subobjects within these top-level values can be of any 5222JSON@. The subobjects within these top-level values can be of any
5223type. Likewise, the parsing functions will only return vectors, 5223type. Likewise, the parsing functions will only return vectors,
5224hashtables, alists, and plists. 5224hashtables, alists, and plists.
5225 5225
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index 9e5f1ccc6fd..167d2bd5ac1 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -167,7 +167,7 @@ default) or the symbol @code{:session}. An activatable service is
167described in a service registration file. Under GNU/Linux, such files 167described in a service registration file. Under GNU/Linux, such files
168are located at @file{/usr/share/dbus-1/system-services/} (for the 168are located at @file{/usr/share/dbus-1/system-services/} (for the
169@code{:system} bus) or @file{/usr/share/dbus-1/services/}. An 169@code{:system} bus) or @file{/usr/share/dbus-1/services/}. An
170activatable service is not necessarily registered at @var{bus} at already. 170activatable service is not necessarily registered at @var{bus} already.
171 171
172The result is a list of strings, which is @code{nil} when there are no 172The result is a list of strings, which is @code{nil} when there are no
173activatable service names at all. Example: 173activatable service names at all. Example:
@@ -180,8 +180,8 @@ activatable service names at all. Example:
180@end defun 180@end defun
181 181
182@defun dbus-list-names bus 182@defun dbus-list-names bus
183All service names, which are registered at D-Bus @var{bus}, are 183This function returns all service names, which are registered at D-Bus
184returned. The result is a list of strings, which is @code{nil} when 184@var{bus}. The result is a list of strings, which is @code{nil} when
185there are no registered service names at all. Well known names are 185there are no registered service names at all. Well known names are
186strings like @samp{org.freedesktop.DBus}. Names starting with 186strings like @samp{org.freedesktop.DBus}. Names starting with
187@samp{:} are unique names for services. 187@samp{:} are unique names for services.
@@ -191,10 +191,10 @@ strings like @samp{org.freedesktop.DBus}. Names starting with
191@end defun 191@end defun
192 192
193@defun dbus-list-known-names bus 193@defun dbus-list-known-names bus
194Retrieves all registered services which correspond to a known name in @var{bus}. 194This function retrieves all registered services which correspond to a
195A service has a known name if it doesn't start with @samp{:}. The 195known name in @var{bus}. A service has a known name if it doesn't
196result is a list of strings, which is @code{nil} when there are no 196start with @samp{:}. The result is a list of strings, which is
197known names at all. 197@code{nil} when there are no known names at all.
198 198
199@var{bus} must be either the symbol @code{:system} or the symbol 199@var{bus} must be either the symbol @code{:system} or the symbol
200@code{:session}. 200@code{:session}.
@@ -202,9 +202,9 @@ known names at all.
202 202
203@defun dbus-list-queued-owners bus service 203@defun dbus-list-queued-owners bus service
204For a given service, registered at D-Bus @var{bus} under the name 204For a given service, registered at D-Bus @var{bus} under the name
205@var{service}, all queued unique names are returned. The result is a 205@var{service}, this function returns all queued unique names. The
206list of strings, or @code{nil} when there are no queued names for 206result is a list of strings, or @code{nil} when there are no queued
207@var{service} at all. 207names for @var{service} at all.
208 208
209@var{bus} must be either the symbol @code{:system} or the symbol 209@var{bus} must be either the symbol @code{:system} or the symbol
210@code{:session}. @var{service} must be a known service name as 210@code{:session}. @var{service} must be a known service name as
@@ -213,9 +213,9 @@ string.
213 213
214@defun dbus-get-name-owner bus service 214@defun dbus-get-name-owner bus service
215For a given service, registered at D-Bus @var{bus} under the name 215For a given service, registered at D-Bus @var{bus} under the name
216@var{service}, the unique name of the name owner is returned. The 216@var{service}, this function returns the unique name of the name
217result is a string, or @code{nil} when there exist no name owner of 217owner. The result is a string, or @code{nil} when there is no name
218@var{service}. 218owner of @var{service}.
219 219
220@var{bus} must be either the symbol @code{:system} or the symbol 220@var{bus} must be either the symbol @code{:system} or the symbol
221@code{:session}. @var{service} must be a known service name as 221@code{:session}. @var{service} must be a known service name as
@@ -223,26 +223,28 @@ string.
223@end defun 223@end defun
224 224
225@defun dbus-ping bus service &optional timeout 225@defun dbus-ping bus service &optional timeout
226Check whether the service name @var{service} is registered at D-Bus 226This function checks whether the service name @var{service} is
227@var{bus}. @var{service} might not have been started yet, it is 227registered at D-Bus @var{bus}. If @var{service} has not yet started,
228autostarted if possible. The result is either @code{t} or @code{nil}. 228it is autostarted if possible. The result is either @code{t} or
229@code{nil}.
229 230
230@var{bus} must be either the symbol @code{:system} or the symbol 231@var{bus} must be either the symbol @code{:system} or the symbol
231@code{:session}. @var{service} must be a string. @var{timeout}, a 232@code{:session}. @var{service} must be a string. @var{timeout}, a
232nonnegative integer, specifies the maximum number of milliseconds 233nonnegative integer, specifies the maximum number of milliseconds
233@code{dbus-ping} must return. The default value is 25,000. Example: 234before @code{dbus-ping} must return. The default value is 25,000.
235Example:
234 236
235@lisp 237@lisp
236(message 238(message
237 "%s screensaver on board." 239 "%s screensaver on board."
238 (cond 240 (cond
239 ((dbus-ping :session "org.gnome.ScreenSaver" 100) "Gnome") 241 ((dbus-ping :session "org.gnome.ScreenSaver" 100) "Gnome")
240 ((dbus-ping :session "org.freedesktop.ScreenSaver" 100) "KDE") 242 ((dbus-ping :session "org.freedesktop.ScreenSaver" 100) "KDE")
241 (t "No"))) 243 (t "No")))
242@end lisp 244@end lisp
243 245
244If it shall be checked whether @var{service} is already running 246To check whether @var{service} is already running without autostarting
245without autostarting it, one shall apply 247it, you can instead write:
246 248
247@lisp 249@lisp
248(member service (dbus-list-known-names bus)) 250(member service (dbus-list-known-names bus))
@@ -250,8 +252,9 @@ without autostarting it, one shall apply
250@end defun 252@end defun
251 253
252@defun dbus-get-unique-name bus 254@defun dbus-get-unique-name bus
253The unique name, under which Emacs is registered at D-Bus @var{bus}, 255@anchor{dbus-get-unique-name}
254is returned as string. 256This function returns the unique name, under which Emacs is registered
257at D-Bus @var{bus}, as a string.
255 258
256@var{bus} must be either the symbol @code{:system} or the symbol 259@var{bus} must be either the symbol @code{:system} or the symbol
257@code{:session}. 260@code{:session}.
@@ -380,8 +383,8 @@ format. Example:
380 383
381@lisp 384@lisp
382(dbus-introspect 385(dbus-introspect
383 :system "org.freedesktop.Hal" 386 :system "org.freedesktop.Hal"
384 "/org/freedesktop/Hal/devices/computer") 387 "/org/freedesktop/Hal/devices/computer")
385 388
386@result{} "<!DOCTYPE node PUBLIC 389@result{} "<!DOCTYPE node PUBLIC
387 "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" 390 "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
@@ -420,46 +423,51 @@ the HAL specification}.}
420@end defun 423@end defun
421 424
422@defun dbus-introspect-xml bus service path 425@defun dbus-introspect-xml bus service path
423This function has the same intention as function 426This function serves a similar purpose to the function
424@code{dbus-introspect}. The returned value is a parsed XML tree, 427@code{dbus-introspect}. The returned value is a parsed XML tree,
425which can be used for further analysis. Example: 428which can be used for further analysis. Example:
426 429
427@lisp 430@lisp
428(dbus-introspect-xml 431(dbus-introspect-xml
429 :session "org.freedesktop.xesam.searcher" 432 :session "org.freedesktop.xesam.searcher"
430 "/org/freedesktop/xesam/searcher/main") 433 "/org/freedesktop/xesam/searcher/main")
431 434
432@result{} (node ((name . "/org/freedesktop/xesam/searcher/main")) 435@result{} (node ((name . "/org/freedesktop/xesam/searcher/main"))
433 (interface ((name . "org.freedesktop.xesam.Search")) 436 (interface ((name . "org.freedesktop.xesam.Search"))
434 (method ((name . "GetHitData")) 437 (method ((name . "GetHitData"))
435 (arg ((name . "search") (type . "s") (direction . "in"))) 438 (arg ((name . "search")
436 (arg ((name . "hit_ids") (type . "au") (direction . "in"))) 439 (type . "s")
437 (arg ((name . "fields") (type . "as") (direction . "in"))) 440 (direction . "in")))
438 (arg ((name . "hit_data") (type . "aav") (direction . "out"))) 441 (arg ((name . "hit_ids")
439 ) 442 (type . "au")
440 @dots{} 443 (direction . "in")))
441 (signal ((name . "HitsAdded")) 444 (arg ((name . "fields")
442 (arg ((name . "search") (type . "s"))) 445 (type . "as")
443 (arg ((name . "count") (type . "u"))) 446 (direction . "in")))
444 ) 447 (arg ((name . "hit_data")
445 ) 448 (type . "aav")
446 @dots{} 449 (direction . "out"))))
447 ) 450 @dots{}
451 (signal ((name . "HitsAdded"))
452 (arg ((name . "search") (type . "s")))
453 (arg ((name . "count") (type . "u")))))
454 @dots{})
448@end lisp 455@end lisp
449@end defun 456@end defun
450 457
451@defun dbus-introspect-get-attribute object attribute 458@defun dbus-introspect-get-attribute object attribute
452It returns the @var{attribute} value of a D-Bus introspection 459This function returns the @var{attribute} value of a D-Bus
453@var{object}. @var{object} can be every subtree of a parsed XML tree 460introspection @var{object}. The value of @var{object} can be any
454as retrieved with @code{dbus-introspect-xml}. @var{attribute} must be 461subtree of a parsed XML tree as retrieved with
455a string according to the attribute names in the D-Bus specification. 462@code{dbus-introspect-xml}. @var{attribute} must be a string
456Example: 463according to the attribute names in the D-Bus specification. Example:
457 464
458@lisp 465@lisp
459(dbus-introspect-get-attribute 466(dbus-introspect-get-attribute
460 (dbus-introspect-xml :system "org.freedesktop.SystemToolsBackends" 467 (dbus-introspect-xml
461 "/org/freedesktop/SystemToolsBackends/UsersConfig") 468 :system "org.freedesktop.SystemToolsBackends"
462 "name") 469 "/org/freedesktop/SystemToolsBackends/UsersConfig")
470 "name")
463 471
464@result{} "/org/freedesktop/SystemToolsBackends/UsersConfig" 472@result{} "/org/freedesktop/SystemToolsBackends/UsersConfig"
465@end lisp 473@end lisp
@@ -476,12 +484,12 @@ The first elements, to be introspected for a D-Bus object, are further
476object paths and interfaces. 484object paths and interfaces.
477 485
478@defun dbus-introspect-get-node-names bus service path 486@defun dbus-introspect-get-node-names bus service path
479All node names of @var{service} in D-Bus @var{bus} at object path 487This function returns all node names of @var{service} in D-Bus
480@var{path} are returned as list of strings. Example: 488@var{bus} at object path @var{path} as a list of strings. Example:
481 489
482@lisp 490@lisp
483(dbus-introspect-get-node-names 491(dbus-introspect-get-node-names
484 :session "org.gnome.seahorse" "/org/gnome/seahorse") 492 :session "org.gnome.seahorse" "/org/gnome/seahorse")
485 493
486@result{} ("crypto" "keys") 494@result{} ("crypto" "keys")
487@end lisp 495@end lisp
@@ -512,9 +520,10 @@ Example:
512@end defun 520@end defun
513 521
514@defun dbus-introspect-get-interface-names bus service path 522@defun dbus-introspect-get-interface-names bus service path
515There will be returned a list strings of all interface names of 523This function returns a list strings of all interface names of
516@var{service} in D-Bus @var{bus} at object path @var{path}. This list 524@var{service} in D-Bus @var{bus} at object path @var{path}. This list
517will contain the default interface @samp{org.freedesktop.DBus.Introspectable}. 525will contain the default interface
526@samp{org.freedesktop.DBus.Introspectable}.
518 527
519Another default interface is @samp{org.freedesktop.DBus.Properties}. 528Another default interface is @samp{org.freedesktop.DBus.Properties}.
520If present, @code{interface} elements can also have @code{property} 529If present, @code{interface} elements can also have @code{property}
@@ -522,8 +531,8 @@ children. Example:
522 531
523@lisp 532@lisp
524(dbus-introspect-get-interface-names 533(dbus-introspect-get-interface-names
525 :system "org.freedesktop.Hal" 534 :system "org.freedesktop.Hal"
526 "/org/freedesktop/Hal/devices/computer") 535 "/org/freedesktop/Hal/devices/computer")
527 536
528@result{} ("org.freedesktop.DBus.Introspectable" 537@result{} ("org.freedesktop.DBus.Introspectable"
529 "org.freedesktop.Hal.Device" 538 "org.freedesktop.Hal.Device"
@@ -533,30 +542,27 @@ children. Example:
533@end defun 542@end defun
534 543
535@defun dbus-introspect-get-interface bus service path interface 544@defun dbus-introspect-get-interface bus service path interface
536Return @var{interface} of @var{service} in D-Bus @var{bus} at object 545This function returns @var{interface} of @var{service} in D-Bus
537path @var{path}. The return value is an XML element. @var{interface} 546@var{bus} at object path @var{path}. The return value is an XML
538must be a string, element of the list returned by 547element. @var{interface} must be a string and a member of the list
539@code{dbus-introspect-get-interface-names}. Example: 548returned by @code{dbus-introspect-get-interface-names}. Example:
540 549
541@lisp 550@lisp
542(dbus-introspect-get-interface 551(dbus-introspect-get-interface
543 :session "org.freedesktop.xesam.searcher" 552 :session "org.freedesktop.xesam.searcher"
544 "/org/freedesktop/xesam/searcher/main" 553 "/org/freedesktop/xesam/searcher/main"
545 "org.freedesktop.xesam.Search") 554 "org.freedesktop.xesam.Search")
546 555
547@result{} (interface ((name . "org.freedesktop.xesam.Search")) 556@result{} (interface ((name . "org.freedesktop.xesam.Search"))
548 (method ((name . "GetHitData")) 557 (method ((name . "GetHitData"))
549 (arg ((name . "search") (type . "s") (direction . "in"))) 558 (arg ((name . "search") (type . "s") (direction . "in")))
550 (arg ((name . "hit_ids") (type . "au") (direction . "in"))) 559 (arg ((name . "hit_ids") (type . "au") (direction . "in")))
551 (arg ((name . "fields") (type . "as") (direction . "in"))) 560 (arg ((name . "fields") (type . "as") (direction . "in")))
552 (arg ((name . "hit_data") (type . "aav") (direction . "out"))) 561 (arg ((name . "hit_data") (type . "aav") (direction . "out"))))
553 )
554 @dots{} 562 @dots{}
555 (signal ((name . "HitsAdded")) 563 (signal ((name . "HitsAdded"))
556 (arg ((name . "search") (type . "s"))) 564 (arg ((name . "search") (type . "s")))
557 (arg ((name . "count") (type . "u"))) 565 (arg ((name . "count") (type . "u")))))
558 )
559 )
560@end lisp 566@end lisp
561@end defun 567@end defun
562 568
@@ -565,7 +571,8 @@ With these functions, it is possible to retrieve all introspection
565data from a running system: 571data from a running system:
566 572
567@lisp 573@lisp
568(with-current-buffer (switch-to-buffer "*introspect*") 574(progn
575 (pop-to-buffer "*introspect*")
569 (erase-buffer) 576 (erase-buffer)
570 (dolist (service (dbus-list-known-names :session)) 577 (dolist (service (dbus-list-known-names :session))
571 (dolist (path (dbus-introspect-get-all-nodes :session service "/")) 578 (dolist (path (dbus-introspect-get-all-nodes :session service "/"))
@@ -574,7 +581,7 @@ data from a running system:
574 (when (delete 581 (when (delete
575 "org.freedesktop.DBus.Introspectable" 582 "org.freedesktop.DBus.Introspectable"
576 (dbus-introspect-get-interface-names :session service path)) 583 (dbus-introspect-get-interface-names :session service path))
577 (insert (message "\nservice: \"%s\" path: \"%s\"\n" service path) 584 (insert (format "\nservice: \"%s\" path: \"%s\"\n" service path)
578 (dbus-introspect :session service path)) 585 (dbus-introspect :session service path))
579 (redisplay t))))) 586 (redisplay t)))))
580@end lisp 587@end lisp
@@ -587,14 +594,15 @@ Methods and signals are the communication means to D-Bus. The
587following functions return their specifications. 594following functions return their specifications.
588 595
589@defun dbus-introspect-get-method-names bus service path interface 596@defun dbus-introspect-get-method-names bus service path interface
590Return a list of strings of all method names of @var{interface} of 597This function returns a list of strings of all method names of
591@var{service} in D-Bus @var{bus} at object path @var{path}. Example: 598@var{interface} of @var{service} in D-Bus @var{bus} at object path
599@var{path}. Example:
592 600
593@lisp 601@lisp
594(dbus-introspect-get-method-names 602(dbus-introspect-get-method-names
595 :session "org.freedesktop.xesam.searcher" 603 :session "org.freedesktop.xesam.searcher"
596 "/org/freedesktop/xesam/searcher/main" 604 "/org/freedesktop/xesam/searcher/main"
597 "org.freedesktop.xesam.Search") 605 "org.freedesktop.xesam.Search")
598 606
599@result{} ("GetState" "StartSearch" "GetHitCount" "GetHits" "NewSession" 607@result{} ("GetState" "StartSearch" "GetHitCount" "GetHits" "NewSession"
600 "CloseSession" "GetHitData" "SetProperty" "NewSearch" 608 "CloseSession" "GetHitData" "SetProperty" "NewSearch"
@@ -603,35 +611,36 @@ Return a list of strings of all method names of @var{interface} of
603@end defun 611@end defun
604 612
605@defun dbus-introspect-get-method bus service path interface method 613@defun dbus-introspect-get-method bus service path interface method
606This function returns @var{method} of @var{interface} as XML element. 614This function returns @var{method} of @var{interface} as an XML
607It must be located at @var{service} in D-Bus @var{bus} at object path 615element. It must be located at @var{service} in D-Bus @var{bus} at
608@var{path}. @var{method} must be a string, element of the list 616object path @var{path}. @var{method} must be a string and a member of
609returned by @code{dbus-introspect-get-method-names}. Example: 617the list returned by @code{dbus-introspect-get-method-names}.
618Example:
610 619
611@lisp 620@lisp
612(dbus-introspect-get-method 621(dbus-introspect-get-method
613 :session "org.freedesktop.xesam.searcher" 622 :session "org.freedesktop.xesam.searcher"
614 "/org/freedesktop/xesam/searcher/main" 623 "/org/freedesktop/xesam/searcher/main"
615 "org.freedesktop.xesam.Search" "GetHitData") 624 "org.freedesktop.xesam.Search" "GetHitData")
616 625
617@result{} (method ((name . "GetHitData")) 626@result{} (method ((name . "GetHitData"))
618 (arg ((name . "search") (type . "s") (direction . "in"))) 627 (arg ((name . "search") (type . "s") (direction . "in")))
619 (arg ((name . "hit_ids") (type . "au") (direction . "in"))) 628 (arg ((name . "hit_ids") (type . "au") (direction . "in")))
620 (arg ((name . "fields") (type . "as") (direction . "in"))) 629 (arg ((name . "fields") (type . "as") (direction . "in")))
621 (arg ((name . "hit_data") (type . "aav") (direction . "out"))) 630 (arg ((name . "hit_data") (type . "aav") (direction . "out"))))
622 )
623@end lisp 631@end lisp
624@end defun 632@end defun
625 633
626@defun dbus-introspect-get-signal-names bus service path interface 634@defun dbus-introspect-get-signal-names bus service path interface
627Return a list of strings of all signal names of @var{interface} of 635This function returns a list of strings of all signal names of
628@var{service} in D-Bus @var{bus} at object path @var{path}. Example: 636@var{interface} of @var{service} in D-Bus @var{bus} at object path
637@var{path}. Example:
629 638
630@lisp 639@lisp
631(dbus-introspect-get-signal-names 640(dbus-introspect-get-signal-names
632 :session "org.freedesktop.xesam.searcher" 641 :session "org.freedesktop.xesam.searcher"
633 "/org/freedesktop/xesam/searcher/main" 642 "/org/freedesktop/xesam/searcher/main"
634 "org.freedesktop.xesam.Search") 643 "org.freedesktop.xesam.Search")
635 644
636@result{} ("StateChanged" "SearchDone" "HitsModified" 645@result{} ("StateChanged" "SearchDone" "HitsModified"
637 "HitsRemoved" "HitsAdded") 646 "HitsRemoved" "HitsAdded")
@@ -639,21 +648,21 @@ Return a list of strings of all signal names of @var{interface} of
639@end defun 648@end defun
640 649
641@defun dbus-introspect-get-signal bus service path interface signal 650@defun dbus-introspect-get-signal bus service path interface signal
642This function returns @var{signal} of @var{interface} as XML element. 651This function returns @var{signal} of @var{interface} as an XML
643It must be located at @var{service} in D-Bus @var{bus} at object path 652element. It must be located at @var{service} in D-Bus @var{bus} at
644@var{path}. @var{signal} must be a string, element of the list 653object path @var{path}. @var{signal} must be a string and a member of
645returned by @code{dbus-introspect-get-signal-names}. Example: 654the list returned by @code{dbus-introspect-get-signal-names}.
655Example:
646 656
647@lisp 657@lisp
648(dbus-introspect-get-signal 658(dbus-introspect-get-signal
649 :session "org.freedesktop.xesam.searcher" 659 :session "org.freedesktop.xesam.searcher"
650 "/org/freedesktop/xesam/searcher/main" 660 "/org/freedesktop/xesam/searcher/main"
651 "org.freedesktop.xesam.Search" "HitsAdded") 661 "org.freedesktop.xesam.Search" "HitsAdded")
652 662
653@result{} (signal ((name . "HitsAdded")) 663@result{} (signal ((name . "HitsAdded"))
654 (arg ((name . "search") (type . "s"))) 664 (arg ((name . "search") (type . "s")))
655 (arg ((name . "count") (type . "u"))) 665 (arg ((name . "count") (type . "u"))))
656 )
657@end lisp 666@end lisp
658@end defun 667@end defun
659 668
@@ -664,8 +673,8 @@ returned by @code{dbus-introspect-get-signal-names}. Example:
664Interfaces can have properties. These can be exposed via the 673Interfaces can have properties. These can be exposed via the
665@samp{org.freedesktop.DBus.Properties} interface@footnote{See 674@samp{org.freedesktop.DBus.Properties} interface@footnote{See
666@uref{https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties}}. 675@uref{https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties}}.
667That is, properties can be retrieved and changed during lifetime of an 676That is, properties can be retrieved and changed during the lifetime
668element. 677of an element.
669 678
670A generalized interface is 679A generalized interface is
671@samp{org.freedesktop.DBus.Objectmanager}@footnote{See 680@samp{org.freedesktop.DBus.Objectmanager}@footnote{See
@@ -678,13 +687,14 @@ Often, they are used to instruct generators, how to generate code from
678the interface for a given language binding. 687the interface for a given language binding.
679 688
680@defun dbus-introspect-get-property-names bus service path interface 689@defun dbus-introspect-get-property-names bus service path interface
681Return a list of strings with all property names of @var{interface} of 690This function returns a list of strings with all property names of
682@var{service} in D-Bus @var{bus} at object path @var{path}. Example: 691@var{interface} of @var{service} in D-Bus @var{bus} at object path
692@var{path}. Example:
683 693
684@lisp 694@lisp
685(dbus-introspect-get-property-names 695(dbus-introspect-get-property-names
686 :session "org.kde.kded" "/modules/networkstatus" 696 :session "org.kde.kded" "/modules/networkstatus"
687 "org.kde.Solid.Networking.Client") 697 "org.kde.Solid.Networking.Client")
688 698
689@result{} ("Status") 699@result{} ("Status")
690@end lisp 700@end lisp
@@ -694,26 +704,26 @@ also the @samp{org.freedesktop.DBus.Properties} interface.
694@end defun 704@end defun
695 705
696@defun dbus-introspect-get-property bus service path interface property 706@defun dbus-introspect-get-property bus service path interface property
697This function returns @var{property} of @var{interface} as XML element. 707This function returns @var{property} of @var{interface} as an XML
698It must be located at @var{service} in D-Bus @var{bus} at object path 708element. It must be located at @var{service} in D-Bus @var{bus} at
699@var{path}. @var{property} must be a string, element of the list 709object path @var{path}. @var{property} must be a string and a member
700returned by @code{dbus-introspect-get-property-names}. 710of the list returned by @code{dbus-introspect-get-property-names}.
701 711
702A @var{property} value can be retrieved by the function 712A @var{property} value can be retrieved by the function
703@code{dbus-introspect-get-attribute}. Example: 713@code{dbus-introspect-get-attribute}. Example:
704 714
705@lisp 715@lisp
706(dbus-introspect-get-property 716(dbus-introspect-get-property
707 :session "org.kde.kded" "/modules/networkstatus" 717 :session "org.kde.kded" "/modules/networkstatus"
708 "org.kde.Solid.Networking.Client" "Status") 718 "org.kde.Solid.Networking.Client" "Status")
709 719
710@result{} (property ((access . "read") (type . "u") (name . "Status"))) 720@result{} (property ((access . "read") (type . "u") (name . "Status")))
711 721
712(dbus-introspect-get-attribute 722(dbus-introspect-get-attribute
713 (dbus-introspect-get-property 723 (dbus-introspect-get-property
714 :session "org.kde.kded" "/modules/networkstatus" 724 :session "org.kde.kded" "/modules/networkstatus"
715 "org.kde.Solid.Networking.Client" "Status") 725 "org.kde.Solid.Networking.Client" "Status")
716 "access") 726 "access")
717 727
718@result{} "read" 728@result{} "read"
719@end lisp 729@end lisp
@@ -727,23 +737,23 @@ result can be any valid D-Bus value, or @code{nil} if there is no
727 737
728@lisp 738@lisp
729(dbus-get-property 739(dbus-get-property
730 :session "org.kde.kded" "/modules/networkstatus" 740 :session "org.kde.kded" "/modules/networkstatus"
731 "org.kde.Solid.Networking.Client" "Status") 741 "org.kde.Solid.Networking.Client" "Status")
732 742
733@result{} 4 743@result{} 4
734@end lisp 744@end lisp
735@end defun 745@end defun
736 746
737@defun dbus-set-property bus service path interface property value 747@defun dbus-set-property bus service path interface property value
738Set value of @var{property} of @var{interface} to @var{value}. It 748This function sets the value of @var{property} of @var{interface} to
739will be checked at @var{bus}, @var{service}, @var{path}. When the 749@var{value}. It will be checked at @var{bus}, @var{service},
740value has been set successful, the result is @var{value}. Otherwise, 750@var{path}. When the value is successfully set, this function returns
741@code{nil} is returned. Example: 751@var{value}. Otherwise, it returns @code{nil}. Example:
742 752
743@lisp 753@lisp
744(dbus-set-property 754(dbus-set-property
745 :session "org.kde.kaccess" "/MainApplication" 755 :session "org.kde.kaccess" "/MainApplication"
746 "com.trolltech.Qt.QApplication" "doubleClickInterval" 500) 756 "com.trolltech.Qt.QApplication" "doubleClickInterval" 500)
747 757
748@result{} 500 758@result{} 500
749@end lisp 759@end lisp
@@ -757,8 +767,8 @@ If there are no properties, @code{nil} is returned. Example:
757 767
758@lisp 768@lisp
759(dbus-get-all-properties 769(dbus-get-all-properties
760 :session "org.kde.kaccess" "/MainApplication" 770 :session "org.kde.kaccess" "/MainApplication"
761 "com.trolltech.Qt.QApplication") 771 "com.trolltech.Qt.QApplication")
762 772
763@result{} (("cursorFlashTime" . 1000) ("doubleClickInterval" . 500) 773@result{} (("cursorFlashTime" . 1000) ("doubleClickInterval" . 500)
764 ("keyboardInputInterval" . 400) ("wheelScrollLines" . 3) 774 ("keyboardInputInterval" . 400) ("wheelScrollLines" . 3)
@@ -773,13 +783,13 @@ This function returns all objects at @var{bus}, @var{service},
773@var{path}, and the children of @var{path}. The result is a list of 783@var{path}, and the children of @var{path}. The result is a list of
774objects. Every object is a cons of an existing path name, and the 784objects. Every object is a cons of an existing path name, and the
775list of available interface objects. An interface object is another 785list of available interface objects. An interface object is another
776cons, which car is the interface name, and the cdr is the list of 786cons, whose car is the interface name and cdr is the list of
777properties as returned by @code{dbus-get-all-properties} for that path 787properties as returned by @code{dbus-get-all-properties} for that path
778and interface. Example: 788and interface. Example:
779 789
780@lisp 790@lisp
781(dbus-get-all-managed-objects 791(dbus-get-all-managed-objects
782 :session "org.gnome.SettingsDaemon" "/") 792 :session "org.gnome.SettingsDaemon" "/")
783 793
784@result{} (("/org/gnome/SettingsDaemon/MediaKeys" 794@result{} (("/org/gnome/SettingsDaemon/MediaKeys"
785 ("org.gnome.SettingsDaemon.MediaKeys") 795 ("org.gnome.SettingsDaemon.MediaKeys")
@@ -809,31 +819,28 @@ An overview of all existing object paths, their interfaces and
809properties could be retrieved by the following code: 819properties could be retrieved by the following code:
810 820
811@lisp 821@lisp
812(with-current-buffer (switch-to-buffer "*objectmanager*") 822(let ((result (mapcar (lambda (service)
823 (cons service
824 (dbus-get-all-managed-objects
825 :session service "/")))
826 (dbus-list-known-names :session))))
827 (pop-to-buffer "*objectmanager*")
813 (erase-buffer) 828 (erase-buffer)
814 (let (result) 829 (pp result (current-buffer)))
815 (dolist (service (dbus-list-known-names :session) result)
816 (message "%s" service)
817 (add-to-list
818 'result
819 (cons service
820 (dbus-get-all-managed-objects :session service "/"))))
821 (insert (message "%s" (pp result)))
822 (redisplay t)))
823@end lisp 830@end lisp
824@end defun 831@end defun
825 832
826@defun dbus-introspect-get-annotation-names bus service path interface &optional name 833@defun dbus-introspect-get-annotation-names bus service path interface &optional name
827Return a list of all annotation names as list of strings. If 834This function returns a list of all annotation names as list of
828@var{name} is @code{nil}, the annotations are children of 835strings. If @var{name} is @code{nil}, the annotations are children of
829@var{interface}, otherwise @var{name} must be a @code{method}, 836@var{interface}, otherwise @var{name} must be a @code{method},
830@code{signal}, or @code{property} XML element, where the annotations 837@code{signal}, or @code{property} XML element, where the annotations
831belong to. Example: 838belong to. Example:
832 839
833@lisp 840@lisp
834(dbus-introspect-get-annotation-names 841(dbus-introspect-get-annotation-names
835 :session "de.berlios.Pinot" "/de/berlios/Pinot" 842 :session "de.berlios.Pinot" "/de/berlios/Pinot"
836 "de.berlios.Pinot" "GetStatistics") 843 "de.berlios.Pinot" "GetStatistics")
837 844
838@result{} ("de.berlios.Pinot.GetStatistics") 845@result{} ("de.berlios.Pinot.GetStatistics")
839@end lisp 846@end lisp
@@ -855,29 +862,30 @@ If set, don't expect a reply to the @code{method} call; defaults to @code{nil}
855@end defun 862@end defun
856 863
857@defun dbus-introspect-get-annotation bus service path interface name annotation 864@defun dbus-introspect-get-annotation bus service path interface name annotation
858Return annotation @var{ANNOTATION} as XML object. If @var{name} is 865This function returns @var{annotation} as an XML object. If
859@code{nil}, @var{ANNOTATION} is a child of @var{interface}, otherwise 866@var{name} is @code{nil}, @var{annotation} is a child of
860@var{name} must be the name of a @code{method}, @code{signal}, or 867@var{interface}, otherwise @var{name} must be the name of a
861@code{property} XML element, where the @var{ANNOTATION} belongs to. 868@code{method}, @code{signal}, or @code{property} XML element, where
869the @var{annotation} belongs to.
862 870
863An attribute value can be retrieved by 871An attribute value can be retrieved by
864@code{dbus-introspect-get-attribute}. Example: 872@code{dbus-introspect-get-attribute}. Example:
865 873
866@lisp 874@lisp
867(dbus-introspect-get-annotation 875(dbus-introspect-get-annotation
868 :session "de.berlios.Pinot" "/de/berlios/Pinot" 876 :session "de.berlios.Pinot" "/de/berlios/Pinot"
869 "de.berlios.Pinot" "GetStatistics" 877 "de.berlios.Pinot" "GetStatistics"
870 "de.berlios.Pinot.GetStatistics") 878 "de.berlios.Pinot.GetStatistics")
871 879
872@result{} (annotation ((name . "de.berlios.Pinot.GetStatistics") 880@result{} (annotation ((name . "de.berlios.Pinot.GetStatistics")
873 (value . "pinotDBus"))) 881 (value . "pinotDBus")))
874 882
875(dbus-introspect-get-attribute 883(dbus-introspect-get-attribute
876 (dbus-introspect-get-annotation 884 (dbus-introspect-get-annotation
877 :session "de.berlios.Pinot" "/de/berlios/Pinot" 885 :session "de.berlios.Pinot" "/de/berlios/Pinot"
878 "de.berlios.Pinot" "GetStatistics" 886 "de.berlios.Pinot" "GetStatistics"
879 "de.berlios.Pinot.GetStatistics") 887 "de.berlios.Pinot.GetStatistics")
880 "value") 888 "value")
881 889
882@result{} "pinotDBus" 890@result{} "pinotDBus"
883@end lisp 891@end lisp
@@ -891,39 +899,41 @@ Methods and signals have arguments. They are described in the
891@code{arg} XML elements. 899@code{arg} XML elements.
892 900
893@defun dbus-introspect-get-argument-names bus service path interface name 901@defun dbus-introspect-get-argument-names bus service path interface name
894Return a list of all argument names as list of strings. @var{name} 902This function returns a list of all argument names as strings.
895must be a @code{method} or @code{signal} XML element. Example: 903@var{name} must be a @code{method} or @code{signal} XML element.
904Example:
896 905
897@lisp 906@lisp
898(dbus-introspect-get-argument-names 907(dbus-introspect-get-argument-names
899 :session "org.freedesktop.xesam.searcher" 908 :session "org.freedesktop.xesam.searcher"
900 "/org/freedesktop/xesam/searcher/main" 909 "/org/freedesktop/xesam/searcher/main"
901 "org.freedesktop.xesam.Search" "GetHitData") 910 "org.freedesktop.xesam.Search" "GetHitData")
902 911
903@result{} ("search" "hit_ids" "fields" "hit_data") 912@result{} ("search" "hit_ids" "fields" "hit_data")
904@end lisp 913@end lisp
905 914
906Argument names are optional; the function can return @code{nil} 915Argument names are optional; the function can therefore return
907therefore, even if the method or signal has arguments. 916@code{nil}, even if the method or signal has arguments.
908@end defun 917@end defun
909 918
910@defun dbus-introspect-get-argument bus service path interface name arg 919@defun dbus-introspect-get-argument bus service path interface name arg
911Return argument @var{ARG} as XML object. @var{name} 920This function returns the argument @var{arg} as an XML object.
912must be a @code{method} or @code{signal} XML element. Example: 921@var{name} must be a @code{method} or @code{signal} XML element.
922Example:
913 923
914@lisp 924@lisp
915(dbus-introspect-get-argument 925(dbus-introspect-get-argument
916 :session "org.freedesktop.xesam.searcher" 926 :session "org.freedesktop.xesam.searcher"
917 "/org/freedesktop/xesam/searcher/main" 927 "/org/freedesktop/xesam/searcher/main"
918 "org.freedesktop.xesam.Search" "GetHitData" "search") 928 "org.freedesktop.xesam.Search" "GetHitData" "search")
919 929
920@result{} (arg ((name . "search") (type . "s") (direction . "in"))) 930@result{} (arg ((name . "search") (type . "s") (direction . "in")))
921@end lisp 931@end lisp
922@end defun 932@end defun
923 933
924@defun dbus-introspect-get-signature bus service path interface name &optional direction 934@defun dbus-introspect-get-signature bus service path interface name &optional direction
925Return signature of a @code{method} or @code{signal}, represented by 935This function returns the signature of a @code{method} or
926@var{name}, as string. 936@code{signal}, represented by @var{name}, as a string.
927 937
928If @var{name} is a @code{method}, @var{direction} can be either 938If @var{name} is a @code{method}, @var{direction} can be either
929@samp{in} or @samp{out}. If @var{direction} is @code{nil}, @samp{in} 939@samp{in} or @samp{out}. If @var{direction} is @code{nil}, @samp{in}
@@ -934,16 +944,16 @@ non-@code{nil}, @var{direction} must be @samp{out}. Example:
934 944
935@lisp 945@lisp
936(dbus-introspect-get-signature 946(dbus-introspect-get-signature
937 :session "org.freedesktop.xesam.searcher" 947 :session "org.freedesktop.xesam.searcher"
938 "/org/freedesktop/xesam/searcher/main" 948 "/org/freedesktop/xesam/searcher/main"
939 "org.freedesktop.xesam.Search" "GetHitData" "in") 949 "org.freedesktop.xesam.Search" "GetHitData" "in")
940 950
941@result{} "sauas" 951@result{} "sauas"
942 952
943(dbus-introspect-get-signature 953(dbus-introspect-get-signature
944 :session "org.freedesktop.xesam.searcher" 954 :session "org.freedesktop.xesam.searcher"
945 "/org/freedesktop/xesam/searcher/main" 955 "/org/freedesktop/xesam/searcher/main"
946 "org.freedesktop.xesam.Search" "HitsAdded") 956 "org.freedesktop.xesam.Search" "HitsAdded")
947 957
948@result{} "su" 958@result{} "su"
949@end lisp 959@end lisp
@@ -998,30 +1008,27 @@ types are represented by the type symbols @code{:byte},
998Example: 1008Example:
999 1009
1000@lisp 1010@lisp
1001(dbus-call-method @dots{} @var{NAT-NUMBER} @var{STRING}) 1011(dbus-call-method @dots{} @var{nat-number} @var{string})
1002@end lisp 1012@end lisp
1003 1013
1004is equivalent to 1014is equivalent to
1005 1015
1006@lisp 1016@lisp
1007(dbus-call-method @dots{} :uint32 @var{NAT-NUMBER} :string @var{STRING}) 1017(dbus-call-method @dots{} :uint32 @var{nat-number} :string @var{string})
1008@end lisp 1018@end lisp
1009 1019
1010but different to 1020but different to
1011 1021
1012@lisp 1022@lisp
1013(dbus-call-method @dots{} :int32 @var{NAT-NUMBER} :signature @var{STRING}) 1023(dbus-call-method @dots{} :int32 @var{nat-number} :signature @var{string})
1014@end lisp 1024@end lisp
1015 1025
1016The value for a byte D-Bus type can be any integer in the range 0 1026The value for a byte D-Bus type can be any integer in the range 0
1017through 255. If a character is used as argument, modifiers 1027through 255. If a character is used as argument, modifiers
1018represented outside this range are stripped off. For example, 1028represented outside this range are stripped off. For example,
1019@code{:byte ?x} is equal to @code{:byte ?\M-x}, but it is not equal to 1029@code{:byte ?x} is equal to @code{:byte ?\M-x}, but it is not equal to
1020@code{:byte ?\C-x} or @code{:byte ?\M-\C-x}. 1030@code{:byte ?\C-x} or @code{:byte ?\M-\C-x}. Signed and unsigned
1021 1031integer D-Bus types expect a corresponding integer value.
1022Signed and unsigned integer D-Bus types expect a corresponding integer
1023value. If the value does not fit Emacs's integer range, it is also
1024possible to use an equivalent floating point number.
1025 1032
1026A D-Bus compound type is always represented as a list. The @sc{car} 1033A D-Bus compound type is always represented as a list. The @sc{car}
1027of this list can be the type symbol @code{:array}, @code{:variant}, 1034of this list can be the type symbol @code{:array}, @code{:variant},
@@ -1036,13 +1043,13 @@ D-Bus compound type rules.
1036@item An array must contain only elements of the same D-Bus type. It 1043@item An array must contain only elements of the same D-Bus type. It
1037can be empty. 1044can be empty.
1038 1045
1039@item A variant must contain only one single element. 1046@item A variant must contain only a single element.
1040 1047
1041@item A dictionary entry must be element of an array, and it must 1048@item A dictionary entry must be an element of an array, and it must
1042contain only a key-value pair of two elements, with a basic D-Bus type 1049contain only a key-value pair of two elements, with a basic D-Bus type
1043key. 1050key.
1044 1051
1045@item There is no restriction for structs. 1052@item There are no restrictions for structs.
1046@end itemize 1053@end itemize
1047 1054
1048If an empty array needs an element D-Bus type other than string, it 1055If an empty array needs an element D-Bus type other than string, it
@@ -1052,27 +1059,27 @@ elements of this array. Example:
1052 1059
1053@lisp 1060@lisp
1054(dbus-call-method 1061(dbus-call-method
1055 :session "org.freedesktop.Notifications" 1062 :session "org.freedesktop.Notifications"
1056 "/org/freedesktop/Notifications" 1063 "/org/freedesktop/Notifications"
1057 "org.freedesktop.Notifications" "Notify" 1064 "org.freedesktop.Notifications" "Notify"
1058 "GNU Emacs" ;; Application name. 1065 "GNU Emacs" ; Application name.
1059 0 ;; No replacement of other notifications. 1066 0 ; No replacement of other notifications.
1060 "" ;; No icon. 1067 "" ; No icon.
1061 "Notification summary" ;; Summary. 1068 "Notification summary" ; Summary.
1062 (format ;; Body. 1069 (format ; Body.
1063 "This is a test notification, raised from\n%S" (emacs-version)) 1070 "This is a test notification, raised from\n%S" (emacs-version))
1064 '(:array) ;; No actions (empty array of strings). 1071 '(:array) ; No actions (empty array of strings).
1065 '(:array :signature "@{sv@}") ;; No hints 1072 '(:array :signature "@{sv@}") ; No hints
1066 ;; (empty array of dictionary entries). 1073 ; (empty array of dictionary entries).
1067 :int32 -1) ;; Default timeout. 1074 :int32 -1) ; Default timeout.
1068 1075
1069@result{} 3 1076@result{} 3
1070@end lisp 1077@end lisp
1071 1078
1072@defun dbus-string-to-byte-array string 1079@defun dbus-string-to-byte-array string
1073Sometimes, D-Bus methods require as input parameter an array of bytes, 1080Sometimes, D-Bus methods require as input parameter an array of bytes,
1074instead of a string. If it is guaranteed, that @var{string} is an 1081instead of a string. If it is guaranteed, that @var{string} is a
1075UTF8 string, this function performs the conversion. Example: 1082UTF-8 string, this function performs the conversion. Example:
1076 1083
1077@lisp 1084@lisp
1078(dbus-string-to-byte-array "/etc/hosts") 1085(dbus-string-to-byte-array "/etc/hosts")
@@ -1083,10 +1090,10 @@ UTF8 string, this function performs the conversion. Example:
1083@end defun 1090@end defun
1084 1091
1085@defun dbus-escape-as-identifier string 1092@defun dbus-escape-as-identifier string
1086Escape an arbitrary @var{string} so it follows the rules for a C 1093This function escapes an arbitrary @var{string} so it follows the
1087identifier. The escaped string can be used as object path component, 1094rules for a C identifier. The escaped string can be used as object
1088interface element component, bus name component or member name in 1095path component, interface element component, bus name component or
1089D-Bus. 1096member name in D-Bus.
1090 1097
1091The escaping consists of replacing all non-alphanumerics, and the 1098The escaping consists of replacing all non-alphanumerics, and the
1092first character if it's a digit, with an underscore and two 1099first character if it's a digit, with an underscore and two
@@ -1107,18 +1114,18 @@ Output parameters of D-Bus methods and signals are mapped to Lisp
1107objects. 1114objects.
1108 1115
1109@example 1116@example
1110@multitable {DBUS_TYPE_OBJECT_PATH} {@expansion{}} {natural number or float} 1117@multitable {DBUS_TYPE_OBJECT_PATH} {@expansion{}} {natural number}
1111@item D-Bus type @tab @tab Lisp type 1118@item D-Bus type @tab @tab Lisp type
1112@item 1119@item
1113@item DBUS_TYPE_BOOLEAN @tab @expansion{} @tab @code{t} or @code{nil} 1120@item DBUS_TYPE_BOOLEAN @tab @expansion{} @tab @code{t} or @code{nil}
1114@item DBUS_TYPE_BYTE @tab @expansion{} @tab natural number 1121@item DBUS_TYPE_BYTE @tab @expansion{} @tab natural number
1115@item DBUS_TYPE_UINT16 @tab @expansion{} @tab natural number 1122@item DBUS_TYPE_UINT16 @tab @expansion{} @tab natural number
1116@item DBUS_TYPE_INT16 @tab @expansion{} @tab integer 1123@item DBUS_TYPE_INT16 @tab @expansion{} @tab integer
1117@item DBUS_TYPE_UINT32 @tab @expansion{} @tab natural number or float 1124@item DBUS_TYPE_UINT32 @tab @expansion{} @tab natural number
1118@item DBUS_TYPE_UNIX_FD @tab @expansion{} @tab natural number or float 1125@item DBUS_TYPE_UNIX_FD @tab @expansion{} @tab natural number
1119@item DBUS_TYPE_INT32 @tab @expansion{} @tab integer or float 1126@item DBUS_TYPE_INT32 @tab @expansion{} @tab integer
1120@item DBUS_TYPE_UINT64 @tab @expansion{} @tab natural number or float 1127@item DBUS_TYPE_UINT64 @tab @expansion{} @tab natural number
1121@item DBUS_TYPE_INT64 @tab @expansion{} @tab integer or float 1128@item DBUS_TYPE_INT64 @tab @expansion{} @tab integer
1122@item DBUS_TYPE_DOUBLE @tab @expansion{} @tab float 1129@item DBUS_TYPE_DOUBLE @tab @expansion{} @tab float
1123@item DBUS_TYPE_STRING @tab @expansion{} @tab string 1130@item DBUS_TYPE_STRING @tab @expansion{} @tab string
1124@item DBUS_TYPE_OBJECT_PATH @tab @expansion{} @tab string 1131@item DBUS_TYPE_OBJECT_PATH @tab @expansion{} @tab string
@@ -1130,26 +1137,21 @@ objects.
1130@end multitable 1137@end multitable
1131@end example 1138@end example
1132 1139
1133A float object in case of @code{DBUS_TYPE_UINT32},
1134@code{DBUS_TYPE_INT32}, @code{DBUS_TYPE_UINT64},
1135@code{DBUS_TYPE_INT64} and @code{DBUS_TYPE_UNIX_FD} is returned, when
1136the C value exceeds the Emacs number size range.
1137
1138The resulting list of the last 4 D-Bus compound types contains as 1140The resulting list of the last 4 D-Bus compound types contains as
1139elements the elements of the D-Bus container, mapped according to the 1141elements the elements of the D-Bus container, mapped according to the
1140same rules. 1142same rules.
1141 1143
1142The signal @code{PropertyModified}, discussed as example in 1144The signal @code{PropertyModified}, discussed as an example in
1143@ref{Inspection}, would offer as Lisp data the following object 1145@ref{Inspection}, would offer as Lisp data the following object
1144(@var{BOOL} stands here for either @code{nil} or @code{t}): 1146(@var{bool} stands here for either @code{nil} or @code{t}):
1145 1147
1146@lisp 1148@lisp
1147(@var{INTEGER} ((@var{STRING} @var{BOOL} @var{BOOL}) (@var{STRING} @var{BOOL} @var{BOOL}) @dots{})) 1149(@var{integer} ((@var{string} @var{bool} @var{bool}) (@var{string} @var{bool} @var{bool}) @dots{}))
1148@end lisp 1150@end lisp
1149 1151
1150@defun dbus-byte-array-to-string byte-array &optional multibyte 1152@defun dbus-byte-array-to-string byte-array &optional multibyte
1151If a D-Bus method or signal returns an array of bytes, which are known 1153If a D-Bus method or signal returns an array of bytes, which are known
1152to represent an UTF8 string, this function converts @var{byte-array} 1154to represent a UTF-8 string, this function converts @var{byte-array}
1153to the corresponding string. The string is unibyte encoded, unless 1155to the corresponding string. The string is unibyte encoded, unless
1154@var{multibyte} is non-@code{nil}. Example: 1156@var{multibyte} is non-@code{nil}. Example:
1155 1157
@@ -1161,9 +1163,9 @@ to the corresponding string. The string is unibyte encoded, unless
1161@end defun 1163@end defun
1162 1164
1163@defun dbus-unescape-from-identifier string 1165@defun dbus-unescape-from-identifier string
1164Retrieve the original string from the encoded @var{string} as unibyte 1166This function retrieves the original string from the encoded
1165string. @var{string} must have been encoded with 1167@var{string} as a unibyte string. The value of @var{string} must have
1166@code{dbus-escape-as-identifier}. Example: 1168been encoded with @code{dbus-escape-as-identifier}. Example:
1167 1169
1168@lisp 1170@lisp
1169(dbus-unescape-from-identifier "_30123abc_5fxyz_01_ff") 1171(dbus-unescape-from-identifier "_30123abc_5fxyz_01_ff")
@@ -1177,9 +1179,9 @@ that string:
1177 1179
1178@lisp 1180@lisp
1179(string-equal 1181(string-equal
1180 (dbus-unescape-from-identifier 1182 (dbus-unescape-from-identifier
1181 (dbus-escape-as-identifier "Grüß Göttin")) 1183 (dbus-escape-as-identifier "Grüß Göttin"))
1182 "Grüß Göttin") 1184 "Grüß Göttin")
1183 1185
1184@result{} nil 1186@result{} nil
1185@end lisp 1187@end lisp
@@ -1196,12 +1198,13 @@ that string:
1196Methods can be called synchronously (@dfn{blocking}) or asynchronously 1198Methods can be called synchronously (@dfn{blocking}) or asynchronously
1197(@dfn{non-blocking}). 1199(@dfn{non-blocking}).
1198 1200
1199At D-Bus level, a method call consist of two messages: one message 1201At the D-Bus level, a method call consist of two messages: one message
1200which carries the input parameters to the object owning the method to 1202which carries the input parameters to the object owning the method to
1201be called, and a reply message returning the resulting output 1203be called, and a reply message returning the resulting output
1202parameters from the object. 1204parameters from the object.
1203 1205
1204@defun dbus-call-method bus service path interface method &optional :timeout timeout &rest args 1206@defun dbus-call-method bus service path interface method &optional :timeout timeout &rest args
1207@anchor{dbus-call-method}
1205This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is 1208This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is
1206either the symbol @code{:system} or the symbol @code{:session}. 1209either the symbol @code{:system} or the symbol @code{:session}.
1207 1210
@@ -1210,14 +1213,14 @@ D-Bus object path, @var{service} is registered at. @var{interface} is
1210an interface offered by @var{service}. It must provide @var{method}. 1213an interface offered by @var{service}. It must provide @var{method}.
1211 1214
1212If the parameter @code{:timeout} is given, the following integer 1215If the parameter @code{:timeout} is given, the following integer
1213@var{timeout} specifies the maximum number of milliseconds the method 1216@var{timeout} specifies the maximum number of milliseconds before the
1214call must return. The default value is 25,000. If the method call 1217method call must return. The default value is 25,000. If the method
1215doesn't return in time, a D-Bus error is raised (@pxref{Errors and 1218call doesn't return in time, a D-Bus error is raised (@pxref{Errors
1216Events}). 1219and Events}).
1217 1220
1218All other arguments args are passed to @var{method} as arguments. 1221The remaining arguments @var{args} are passed to @var{method} as
1219They are converted into D-Bus types as described in @ref{Type 1222arguments. They are converted into D-Bus types as described in
1220Conversion}. 1223@ref{Type Conversion}.
1221 1224
1222The function returns the resulting values of @var{method} as a list of 1225The function returns the resulting values of @var{method} as a list of
1223Lisp objects, according to the type conversion rules described in 1226Lisp objects, according to the type conversion rules described in
@@ -1225,9 +1228,9 @@ Lisp objects, according to the type conversion rules described in
1225 1228
1226@lisp 1229@lisp
1227(dbus-call-method 1230(dbus-call-method
1228 :session "org.gnome.seahorse" "/org/gnome/seahorse/keys/openpgp" 1231 :session "org.gnome.seahorse" "/org/gnome/seahorse/keys/openpgp"
1229 "org.gnome.seahorse.Keys" "GetKeyField" 1232 "org.gnome.seahorse.Keys" "GetKeyField"
1230 "openpgp:657984B8C7A966DD" "simple-name") 1233 "openpgp:657984B8C7A966DD" "simple-name")
1231 1234
1232@result{} (t ("Philip R. Zimmermann")) 1235@result{} (t ("Philip R. Zimmermann"))
1233@end lisp 1236@end lisp
@@ -1238,10 +1241,10 @@ object. Example:
1238 1241
1239@lisp 1242@lisp
1240(dbus-call-method 1243(dbus-call-method
1241 :system "org.freedesktop.Hal" 1244 :system "org.freedesktop.Hal"
1242 "/org/freedesktop/Hal/devices/computer" 1245 "/org/freedesktop/Hal/devices/computer"
1243 "org.freedesktop.Hal.Device" "GetPropertyString" 1246 "org.freedesktop.Hal.Device" "GetPropertyString"
1244 "system.kernel.machine") 1247 "system.kernel.machine")
1245 1248
1246@result{} "i686" 1249@result{} "i686"
1247@end lisp 1250@end lisp
@@ -1257,17 +1260,17 @@ emulate the @code{lshal} command on GNU/Linux systems:
1257 1260
1258@lisp 1261@lisp
1259(dolist (device 1262(dolist (device
1260 (dbus-call-method 1263 (dbus-call-method
1261 :system "org.freedesktop.Hal" 1264 :system "org.freedesktop.Hal"
1262 "/org/freedesktop/Hal/Manager" 1265 "/org/freedesktop/Hal/Manager"
1263 "org.freedesktop.Hal.Manager" "GetAllDevices")) 1266 "org.freedesktop.Hal.Manager" "GetAllDevices"))
1264 (message "\nudi = %s" device) 1267 (message "\nudi = %s" device)
1265 (dolist (properties 1268 (dolist (properties
1266 (dbus-call-method 1269 (dbus-call-method
1267 :system "org.freedesktop.Hal" device 1270 :system "org.freedesktop.Hal" device
1268 "org.freedesktop.Hal.Device" "GetAllProperties")) 1271 "org.freedesktop.Hal.Device" "GetAllProperties"))
1269 (message " %s = %S" 1272 (message " %s = %S"
1270 (car properties) (or (caar (cdr properties)) "")))) 1273 (car properties) (or (caadr properties) ""))))
1271 1274
1272@print{} "udi = /org/freedesktop/Hal/devices/computer 1275@print{} "udi = /org/freedesktop/Hal/devices/computer
1273 info.addons = (\"hald-addon-acpi\") 1276 info.addons = (\"hald-addon-acpi\")
@@ -1304,34 +1307,35 @@ D-Bus object path, @var{service} is registered at. @var{interface} is
1304an interface offered by @var{service}. It must provide @var{method}. 1307an interface offered by @var{service}. It must provide @var{method}.
1305 1308
1306@var{handler} is a Lisp function, which is called when the 1309@var{handler} is a Lisp function, which is called when the
1307corresponding return message has arrived. If @var{handler} is 1310corresponding return message arrives. If @var{handler} is @code{nil},
1308@code{nil}, no return message will be expected. 1311no return message will be expected.
1309 1312
1310If the parameter @code{:timeout} is given, the following integer 1313If the parameter @code{:timeout} is given, the following integer
1311@var{timeout} specifies the maximum number of milliseconds a reply 1314@var{timeout} specifies the maximum number of milliseconds before a
1312message must arrive. The default value is 25,000. If there is no 1315reply message must arrive. The default value is 25,000. If there is
1313reply message in time, a D-Bus error is raised (@pxref{Errors and 1316no reply message in time, a D-Bus error is raised (@pxref{Errors and
1314Events}). 1317Events}).
1315 1318
1316All other arguments args are passed to @var{method} as arguments. 1319The remaining arguments @var{args} are passed to @var{method} as
1317They are converted into D-Bus types as described in @ref{Type 1320arguments. They are converted into D-Bus types as described in
1318Conversion}. 1321@ref{Type Conversion}.
1319 1322
1320If @var{handler} is a Lisp function, the function returns a key into 1323If @var{handler} is a Lisp function, the function returns a key into
1321the hash table @code{dbus-registered-objects-table}. The 1324the hash table @code{dbus-registered-objects-table}. The
1322corresponding entry in the hash table is removed, when the return 1325corresponding entry in the hash table is removed, when the return
1323message has been arrived, and @var{handler} is called. Example: 1326message arrives, and @var{handler} is called. Example:
1324 1327
1325@lisp 1328@lisp
1326(dbus-call-method-asynchronously 1329(dbus-call-method-asynchronously
1327 :system "org.freedesktop.Hal" 1330 :system "org.freedesktop.Hal"
1328 "/org/freedesktop/Hal/devices/computer" 1331 "/org/freedesktop/Hal/devices/computer"
1329 "org.freedesktop.Hal.Device" "GetPropertyString" 'message 1332 "org.freedesktop.Hal.Device" "GetPropertyString"
1330 "system.kernel.machine") 1333 (lambda (msg) (message "%s" msg))
1331 1334 "system.kernel.machine")
1332@result{} (:serial :system 2)
1333 1335
1334@print{} i686 1336@print{} i686
1337
1338@result{} (:serial :system 2)
1335@end lisp 1339@end lisp
1336@end defun 1340@end defun
1337 1341
@@ -1347,7 +1351,8 @@ clients. Names on the D-Bus can be registered and unregistered using
1347the following functions: 1351the following functions:
1348 1352
1349@defun dbus-register-service bus service &rest flags 1353@defun dbus-register-service bus service &rest flags
1350Register the known name @var{service} on D-Bus @var{bus}. 1354This function registers the known name @var{service} on D-Bus
1355@var{bus}.
1351 1356
1352@var{bus} is either the symbol @code{:system} or the symbol 1357@var{bus} is either the symbol @code{:system} or the symbol
1353@code{:session}. 1358@code{:session}.
@@ -1357,36 +1362,33 @@ must be a known name.
1357 1362
1358@var{flags} is a subset of the following keywords: 1363@var{flags} is a subset of the following keywords:
1359 1364
1360@itemize 1365@table @code
1361@item @code{:allow-replacement}: Allow another service to become the primary 1366@item :allow-replacement
1362owner if requested. 1367Allow another service to become the primary owner if requested.
1363 1368@item :replace-existing
1364@item @code{:replace-existing}: Request to replace the current primary owner. 1369Request to replace the current primary owner.
1365 1370@item :do-not-queue
1366@item @code{:do-not-queue}: If we can not become the primary owner do not 1371If we can not become the primary owner do not place us in the queue.
1367place us in the queue. 1372@end table
1368@end itemize
1369 1373
1370One of the following keywords is returned: 1374One of the following keywords is returned:
1371 1375
1372@itemize 1376@table @code
1373 1377@item :primary-owner
1374@item @code{:primary-owner}: We have become the primary owner of the name 1378We have become the primary owner of the name @var{service}.
1375@var{service}. 1379@item :in-queue
1376 1380We could not become the primary owner and have been placed in the
1377@item @code{:in-queue}: We could not become the primary owner and 1381queue.
1378have been placed in the queue. 1382@item :exists
1379 1383We already are in the queue.
1380@item @code{:exists}: We already are in the queue. 1384@item :already-owner
1381 1385We already are the primary owner.
1382@item @code{:already-owner}: We already are the primary 1386@end table
1383owner.
1384@end itemize
1385@end defun 1387@end defun
1386 1388
1387@defun dbus-unregister-service bus service 1389@defun dbus-unregister-service bus service
1388Unregister all objects from D-Bus @var{bus}, registered by Emacs for 1390This function unregisters all objects from D-Bus @var{bus}, that were
1389@var{service}. 1391registered by Emacs for @var{service}.
1390 1392
1391@var{bus} is either the symbol @code{:system} or the symbol 1393@var{bus} is either the symbol @code{:system} or the symbol
1392@code{:session}. 1394@code{:session}.
@@ -1397,24 +1399,27 @@ D-Bus.
1397 1399
1398One of the following keywords is returned: 1400One of the following keywords is returned:
1399 1401
1400@itemize 1402@table @code
1401@item @code{:released}: We successfully released the name @var{service}. 1403@item :released
1402@item @code{:non-existent}: The name @var{service} does not exist on the bus. 1404We successfully released the name @var{service}.
1403@item @code{:not-owner}: We are not an owner of the name @var{service}. 1405@item :non-existent
1404@end itemize 1406The name @var{service} does not exist on the bus.
1407@item :not-owner
1408We are not an owner of the name @var{service}.
1409@end table
1405@end defun 1410@end defun
1406 1411
1407When a name has been chosen, Emacs can offer own methods, which can be 1412When a name has been chosen, Emacs can offer its own methods, which
1408called by other applications. These methods could be an 1413can be called by other applications. These methods could be an
1409implementation of an interface of a well known service, like 1414implementation of an interface of a well known service, like
1410@samp{org.freedesktop.TextEditor}. 1415@samp{org.freedesktop.TextEditor}.
1411 1416
1412It could be also an implementation of an own interface. In this case, 1417They could also be an implementation of its own interface. In this
1413the service name must be @samp{org.gnu.Emacs}. The object path shall 1418case, the service name must be @samp{org.gnu.Emacs}. The object path
1414begin with @samp{/org/gnu/Emacs/@strong{Application}}, and the 1419shall begin with @samp{/org/gnu/Emacs/@var{application}}, and the
1415interface name shall be @code{org.gnu.Emacs.@strong{Application}}. 1420interface name shall be @code{org.gnu.Emacs.@var{application}}, where
1416@samp{@strong{Application}} is the name of the application which 1421@var{application} is the name of the application which provides the
1417provides the interface. 1422interface.
1418 1423
1419@deffn Constant dbus-service-emacs 1424@deffn Constant dbus-service-emacs
1420The well known service name @samp{org.gnu.Emacs} of Emacs. 1425The well known service name @samp{org.gnu.Emacs} of Emacs.
@@ -1436,10 +1441,10 @@ With this function, an application registers @var{method} on the D-Bus
1436@code{:session}. 1441@code{:session}.
1437 1442
1438@var{service} is the D-Bus service name of the D-Bus object 1443@var{service} is the D-Bus service name of the D-Bus object
1439@var{method} is registered for. It must be a known name (See 1444@var{method} is registered for. It must be a known name (see
1440discussion of @var{dont-register-service} below). 1445discussion of @var{dont-register-service} below).
1441 1446
1442@var{path} is the D-Bus object path @var{service} is registered (See 1447@var{path} is the D-Bus object path @var{service} is registered (see
1443discussion of @var{dont-register-service} below). 1448discussion of @var{dont-register-service} below).
1444 1449
1445@var{interface} is the interface offered by @var{service}. It must 1450@var{interface} is the interface offered by @var{service}. It must
@@ -1456,8 +1461,8 @@ If @var{handler} wants to return just one Lisp object and it is not a
1456cons cell, @var{handler} can return this object directly, instead of 1461cons cell, @var{handler} can return this object directly, instead of
1457returning a list containing the object. 1462returning a list containing the object.
1458 1463
1459In case @var{handler} shall return a reply message with an empty 1464If @var{handler} returns a reply message with an empty argument list,
1460argument list, @var{handler} must return the symbol @code{:ignore}. 1465@var{handler} must return the symbol @code{:ignore}.
1461 1466
1462When @var{dont-register-service} is non-@code{nil}, the known name 1467When @var{dont-register-service} is non-@code{nil}, the known name
1463@var{service} is not registered. This means that other D-Bus clients 1468@var{service} is not registered. This means that other D-Bus clients
@@ -1468,7 +1473,7 @@ clients from discovering the still incomplete interface.
1468 1473
1469The default D-Bus timeout when waiting for a message reply is 25 1474The default D-Bus timeout when waiting for a message reply is 25
1470seconds. This value could be even smaller, depending on the calling 1475seconds. This value could be even smaller, depending on the calling
1471client. Therefore, @var{handler} shall not last longer than 1476client. Therefore, @var{handler} should not last longer than
1472absolutely necessary. 1477absolutely necessary.
1473 1478
1474@code{dbus-register-method} returns a Lisp object, which can be used 1479@code{dbus-register-method} returns a Lisp object, which can be used
@@ -1477,18 +1482,14 @@ registration for @var{method}. Example:
1477 1482
1478@lisp 1483@lisp
1479(defun my-dbus-method-handler (filename) 1484(defun my-dbus-method-handler (filename)
1480 (let (result) 1485 (if (find-file filename)
1481 (if (find-file filename) 1486 '(:boolean t)
1482 (setq result '(:boolean t)) 1487 '(:boolean nil)))
1483 (setq result '(:boolean nil)))
1484 result))
1485
1486@result{} my-dbus-method-handler
1487 1488
1488(dbus-register-method 1489(dbus-register-method
1489 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor" 1490 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
1490 "org.freedesktop.TextEditor" "OpenFile" 1491 "org.freedesktop.TextEditor" "OpenFile"
1491 'my-dbus-method-handler) 1492 #'my-dbus-method-handler)
1492 1493
1493@result{} ((:method :session "org.freedesktop.TextEditor" "OpenFile") 1494@result{} ((:method :session "org.freedesktop.TextEditor" "OpenFile")
1494 ("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor" 1495 ("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
@@ -1496,9 +1497,9 @@ registration for @var{method}. Example:
1496@end lisp 1497@end lisp
1497 1498
1498If you invoke the method @samp{org.freedesktop.TextEditor.OpenFile} 1499If you invoke the method @samp{org.freedesktop.TextEditor.OpenFile}
1499from another D-Bus application with a filename as parameter, the file 1500from another D-Bus application with a file name as parameter, the file
1500is opened in Emacs, and the method returns either @var{true} or 1501is opened in Emacs, and the method returns either @var{true} or
1501@var{false}, indicating the success of the method. As test tool one 1502@var{false}, indicating the success of the method. As a test tool one
1502could use the command line tool @code{dbus-send} in a shell: 1503could use the command line tool @code{dbus-send} in a shell:
1503 1504
1504@example 1505@example
@@ -1522,11 +1523,9 @@ You can indicate an error by raising the Emacs signal
1522 (find-file (car args)) 1523 (find-file (car args))
1523 (error (signal 'dbus-error (cdr err)))) 1524 (error (signal 'dbus-error (cdr err))))
1524 t) 1525 t)
1525
1526@result{} my-dbus-method-handler
1527@end lisp 1526@end lisp
1528 1527
1529The test runs then 1528The test then runs
1530 1529
1531@example 1530@example
1532# dbus-send --session --print-reply \ 1531# dbus-send --session --print-reply \
@@ -1550,7 +1549,7 @@ With this function, an application declares a @var{property} on the D-Bus
1550@var{service} is the D-Bus service name of the D-Bus. It must be a 1549@var{service} is the D-Bus service name of the D-Bus. It must be a
1551known name. 1550known name.
1552 1551
1553@var{path} is the D-Bus object path @var{service} is registered (See 1552@var{path} is the D-Bus object path @var{service} is registered (see
1554discussion of @var{dont-register-service} below). 1553discussion of @var{dont-register-service} below).
1555 1554
1556@var{interface} is the name of the interface used at @var{path}, 1555@var{interface} is the name of the interface used at @var{path},
@@ -1559,7 +1558,7 @@ discussion of @var{dont-register-service} below).
1559@var{access} indicates, whether the property can be changed by other 1558@var{access} indicates, whether the property can be changed by other
1560services via D-Bus. It must be either the symbol @code{:read} or 1559services via D-Bus. It must be either the symbol @code{:read} or
1561@code{:readwrite}. @var{value} is the initial value of the property, 1560@code{:readwrite}. @var{value} is the initial value of the property,
1562it can be of any valid type (see @code{dbus-call-method} for details). 1561it can be of any valid type (@xref{dbus-call-method}, for details).
1563 1562
1564If @var{property} already exists on @var{path}, it will be 1563If @var{property} already exists on @var{path}, it will be
1565overwritten. For properties with access type @code{:read} this is the 1564overwritten. For properties with access type @code{:read} this is the
@@ -1584,15 +1583,15 @@ clients from discovering the still incomplete interface.
1584 1583
1585@lisp 1584@lisp
1586(dbus-register-property 1585(dbus-register-property
1587 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor" 1586 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
1588 "org.freedesktop.TextEditor" "name" :read "GNU Emacs") 1587 "org.freedesktop.TextEditor" "name" :read "GNU Emacs")
1589 1588
1590@result{} ((:property :session "org.freedesktop.TextEditor" "name") 1589@result{} ((:property :session "org.freedesktop.TextEditor" "name")
1591 ("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor")) 1590 ("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"))
1592 1591
1593(dbus-register-property 1592(dbus-register-property
1594 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor" 1593 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
1595 "org.freedesktop.TextEditor" "version" :readwrite emacs-version t) 1594 "org.freedesktop.TextEditor" "version" :readwrite emacs-version t)
1596 1595
1597@result{} ((:property :session "org.freedesktop.TextEditor" "version") 1596@result{} ((:property :session "org.freedesktop.TextEditor" "version")
1598 ("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor")) 1597 ("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"))
@@ -1623,28 +1622,28 @@ possible via the command line tool @code{dbus-send} in a shell:
1623 ] 1622 ]
1624@end example 1623@end example
1625 1624
1626It is also possible, to apply the @code{dbus-get-property}, 1625It is also possible to apply the @code{dbus-get-property},
1627@code{dbus-get-all-properties} and @code{dbus-set-property} functions 1626@code{dbus-get-all-properties} and @code{dbus-set-property} functions
1628(@pxref{Properties and Annotations}). 1627(@pxref{Properties and Annotations}).
1629 1628
1630@lisp 1629@lisp
1631(dbus-set-property 1630(dbus-set-property
1632 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor" 1631 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
1633 "org.freedesktop.TextEditor" "version" "23.1.50") 1632 "org.freedesktop.TextEditor" "version" "23.1.50")
1634 1633
1635@result{} "23.1.50" 1634@result{} "23.1.50"
1636 1635
1637(dbus-get-property 1636(dbus-get-property
1638 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor" 1637 :session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
1639 "org.freedesktop.TextEditor" "version") 1638 "org.freedesktop.TextEditor" "version")
1640 1639
1641@result{} "23.1.50" 1640@result{} "23.1.50"
1642@end lisp 1641@end lisp
1643@end defun 1642@end defun
1644 1643
1645@defun dbus-unregister-object object 1644@defun dbus-unregister-object object
1646Unregister @var{object} from the D-Bus. @var{object} must be the 1645This function unregisters @var{object} from the D-Bus. @var{object}
1647result of a preceding @code{dbus-register-method}, 1646must be the result of a preceding @code{dbus-register-method},
1648@code{dbus-register-property} or @code{dbus-register-signal} call 1647@code{dbus-register-property} or @code{dbus-register-signal} call
1649(@pxref{Signals}). It returns @code{t} if @var{object} has been 1648(@pxref{Signals}). It returns @code{t} if @var{object} has been
1650unregistered, @code{nil} otherwise. 1649unregistered, @code{nil} otherwise.
@@ -1672,22 +1671,22 @@ doesn't matter whether another object has registered for @var{signal}.
1672 1671
1673Signals can be unicast or broadcast messages. For broadcast messages, 1672Signals can be unicast or broadcast messages. For broadcast messages,
1674@var{service} must be @code{nil}. Otherwise, @var{service} is the 1673@var{service} must be @code{nil}. Otherwise, @var{service} is the
1675D-Bus service name the signal is sent to as unicast 1674D-Bus service name the signal is sent to as a unicast
1676message.@footnote{For backward compatibility, a broadcast message is 1675message.@footnote{For backward compatibility, a broadcast message is
1677also emitted if @var{service} is the known or unique name Emacs is 1676also emitted if @var{service} is the known or unique name Emacs is
1678registered at D-Bus @var{bus}.} @var{path} is the D-Bus object path 1677registered at D-Bus @var{bus}.} @var{path} is the D-Bus object path
1679@var{signal} is sent from. @var{interface} is an interface available 1678@var{signal} is sent from. @var{interface} is an interface available
1680at @var{path}. It must provide @var{signal}. 1679at @var{path}. It must provide @var{signal}.
1681 1680
1682All other arguments args are passed to @var{signal} as arguments. 1681The remaining arguments @var{args} are passed to @var{signal} as
1683They are converted into D-Bus types as described in @ref{Type 1682arguments. They are converted into D-Bus types as described in
1684Conversion}. Example: 1683@ref{Type Conversion}. Example:
1685 1684
1686@lisp 1685@lisp
1687(dbus-send-signal 1686(dbus-send-signal
1688 :session nil dbus-path-emacs 1687 :session nil dbus-path-emacs
1689 (concat dbus-interface-emacs ".FileManager") "FileModified" 1688 (concat dbus-interface-emacs ".FileManager") "FileModified"
1690 "/home/albinus/.emacs") 1689 "/home/albinus/.emacs")
1691@end lisp 1690@end lisp
1692@end defun 1691@end defun
1693 1692
@@ -1702,11 +1701,11 @@ With this function, an application registers for a signal on the D-Bus
1702object. It can be either a known name or the unique name of the D-Bus 1701object. It can be either a known name or the unique name of the D-Bus
1703object sending the signal. A known name will be mapped onto the 1702object sending the signal. A known name will be mapped onto the
1704unique name of the object, owning @var{service} at registration time. 1703unique name of the object, owning @var{service} at registration time.
1705When the corresponding D-Bus object disappears, signals won't be 1704When the corresponding D-Bus object disappears, signals will no longer
1706received any longer. 1705be received.
1707 1706
1708@var{path} is the corresponding D-Bus object path, @var{service} is 1707@var{path} is the corresponding D-Bus object path that @var{service}
1709registered at. @var{interface} is an interface offered by 1708is registered at. @var{interface} is an interface offered by
1710@var{service}. It must provide @var{signal}. 1709@var{service}. It must provide @var{signal}.
1711 1710
1712@var{service}, @var{path}, @var{interface} and @var{signal} can be 1711@var{service}, @var{path}, @var{interface} and @var{signal} can be
@@ -1721,30 +1720,31 @@ The remaining arguments @var{args} can be keywords or keyword string
1721pairs.@footnote{For backward compatibility, the arguments @var{args} 1720pairs.@footnote{For backward compatibility, the arguments @var{args}
1722can also be just strings. They stand for the respective arguments of 1721can also be just strings. They stand for the respective arguments of
1723@var{signal} in their order, and are used for filtering as well. A 1722@var{signal} in their order, and are used for filtering as well. A
1724@code{nil} argument might be used to preserve the order.} The meaning 1723@code{nil} argument might be used to preserve the order.} Their
1725is as follows: 1724meaning is as follows:
1726 1725
1727@itemize 1726@table @code
1728@item @code{:argN} @var{string}:@* 1727@item :arg@var{n} @var{string}
1729@code{:pathN} @var{string}:@* 1728@item :path@var{n} @var{string}
1730This stands for the Nth argument of the signal. @code{:pathN} 1729This stands for the @var{n}th argument of the signal.
1731arguments can be used for object path wildcard matches as specified by 1730@code{:path@var{n}} arguments can be used for object path wildcard
1732D-Bus, while an @code{:argN} argument requires an exact match. 1731matches as specified by D-Bus, while an @code{:argN} argument requires
1733 1732an exact match.
1734@item @code{:arg-namespace} @var{string}:@* 1733
1735Register for the signals, which first argument defines the service or 1734@item :arg-namespace @var{string}
1736interface namespace @var{string}. 1735Register for those signals, whose first argument names a service or
1737 1736interface within the namespace @var{string}.
1738@item @code{:path-namespace} @var{string}:@* 1737
1738@item :path-namespace @var{string}
1739Register for the object path namespace @var{string}. All signals sent 1739Register for the object path namespace @var{string}. All signals sent
1740from an object path, which has @var{string} as the preceding string, 1740from an object path, which has @var{string} as the preceding string,
1741are matched. This requires @var{path} to be @code{nil}. 1741are matched. This requires @var{path} to be @code{nil}.
1742 1742
1743@item @code{:eavesdrop}:@* 1743@item :eavesdrop
1744Register for unicast signals which are not directed to the D-Bus 1744Register for unicast signals which are not directed to the D-Bus
1745object Emacs is registered at D-Bus BUS, if the security policy of BUS 1745object Emacs is registered at D-Bus BUS, if the security policy of BUS
1746allows this. Otherwise, this argument is ignored. 1746allows this. Otherwise, this argument is ignored.
1747@end itemize 1747@end table
1748 1748
1749@code{dbus-register-signal} returns a Lisp object, which can be used 1749@code{dbus-register-signal} returns a Lisp object, which can be used
1750as argument in @code{dbus-unregister-object} for removing the 1750as argument in @code{dbus-unregister-object} for removing the
@@ -1754,12 +1754,10 @@ registration for @var{signal}. Example:
1754(defun my-dbus-signal-handler (device) 1754(defun my-dbus-signal-handler (device)
1755 (message "Device %s added" device)) 1755 (message "Device %s added" device))
1756 1756
1757@result{} my-dbus-signal-handler
1758
1759(dbus-register-signal 1757(dbus-register-signal
1760 :system "org.freedesktop.Hal" "/org/freedesktop/Hal/Manager" 1758 :system "org.freedesktop.Hal" "/org/freedesktop/Hal/Manager"
1761 "org.freedesktop.Hal.Manager" "DeviceAdded" 1759 "org.freedesktop.Hal.Manager" "DeviceAdded"
1762 'my-dbus-signal-handler) 1760 #'my-dbus-signal-handler)
1763 1761
1764@result{} ((:signal :system "org.freedesktop.Hal.Manager" "DeviceAdded") 1762@result{} ((:signal :system "org.freedesktop.Hal.Manager" "DeviceAdded")
1765 ("org.freedesktop.Hal" "/org/freedesktop/Hal/Manager" 1763 ("org.freedesktop.Hal" "/org/freedesktop/Hal/Manager"
@@ -1769,8 +1767,8 @@ registration for @var{signal}. Example:
1769As we know from the introspection data of interface 1767As we know from the introspection data of interface
1770@samp{org.freedesktop.Hal.Manager}, the signal @samp{DeviceAdded} 1768@samp{org.freedesktop.Hal.Manager}, the signal @samp{DeviceAdded}
1771provides one single parameter, which is mapped into a Lisp string. 1769provides one single parameter, which is mapped into a Lisp string.
1772The callback function @code{my-dbus-signal-handler} must define one 1770The callback function @code{my-dbus-signal-handler} must therefore
1773single string argument therefore. Plugging an USB device to your 1771define a single string argument. Plugging a USB device into your
1774machine, when registered for signal @samp{DeviceAdded}, will show you 1772machine, when registered for signal @samp{DeviceAdded}, will show you
1775which objects the GNU/Linux @code{hal} daemon adds. 1773which objects the GNU/Linux @code{hal} daemon adds.
1776 1774
@@ -1781,7 +1779,7 @@ for a dummy signal, and check the result:
1781@lisp 1779@lisp
1782(dbus-ignore-errors 1780(dbus-ignore-errors
1783 (dbus-register-signal 1781 (dbus-register-signal
1784 :system nil nil nil nil 'ignore :path-namespace "/invalid/path")) 1782 :system nil nil nil nil #'ignore :path-namespace "/invalid/path"))
1785 1783
1786@result{} nil 1784@result{} nil
1787@end lisp 1785@end lisp
@@ -1796,14 +1794,14 @@ for a dummy signal, and check the result:
1796 1794
1797Until now, we have spoken about the system and the session buses, 1795Until now, we have spoken about the system and the session buses,
1798which are the default buses to be connected to. However, it is 1796which are the default buses to be connected to. However, it is
1799possible to connect to any bus, from which the address is known. This 1797possible to connect to any bus with a known address. This is a UNIX
1800is a UNIX domain or TCP/IP socket. Everywhere, where a @var{bus} is 1798domain or TCP/IP socket. Everywhere, where a @var{bus} is mentioned
1801mentioned as argument of a function (the symbol @code{:system} or the 1799as argument of a function (the symbol @code{:system} or the symbol
1802symbol @code{:session}), this address can be used instead. The 1800@code{:session}), this address can be used instead. The connection to
1803connection to this bus must be initialized first. 1801this bus must be initialized first.
1804 1802
1805@defun dbus-init-bus bus &optional private 1803@defun dbus-init-bus bus &optional private
1806Establish the connection to D-Bus @var{bus}. 1804This function establishes the connection to D-Bus @var{bus}.
1807 1805
1808@var{bus} can be either the symbol @code{:system} or the symbol 1806@var{bus} can be either the symbol @code{:system} or the symbol
1809@code{:session}, or it can be a string denoting the address of the 1807@code{:session}, or it can be a string denoting the address of the
@@ -1811,12 +1809,12 @@ corresponding bus. For the system and session buses, this function
1811is called when loading @file{dbus.el}, there is no need to call it 1809is called when loading @file{dbus.el}, there is no need to call it
1812again. 1810again.
1813 1811
1814The function returns a number, which counts the connections this Emacs 1812The function returns the number of connections this Emacs session has
1815session has established to the @var{bus} under the same unique name 1813established to the @var{bus} under the same unique name
1816(see @code{dbus-get-unique-name}). It depends on the libraries Emacs 1814(@pxref{dbus-get-unique-name}). It depends on the libraries Emacs is
1817is linked with, and on the environment Emacs is running. For example, 1815linked with, and on the environment Emacs is running. For example, if
1818if Emacs is linked with the GTK+ toolkit, and it runs in a GTK+-aware 1816Emacs is linked with the GTK+ toolkit, and it runs in a GTK+-aware
1819environment like Gnome, another connection might already be 1817environment like GNOME, another connection might already be
1820established. 1818established.
1821 1819
1822When @var{private} is non-@code{nil}, a new connection is established 1820When @var{private} is non-@code{nil}, a new connection is established
@@ -1831,9 +1829,9 @@ Example: You initialize a connection to the AT-SPI bus on your host:
1831 1829
1832@lisp 1830@lisp
1833(setq my-bus 1831(setq my-bus
1834 (dbus-call-method 1832 (dbus-call-method
1835 :session "org.a11y.Bus" "/org/a11y/bus" 1833 :session "org.a11y.Bus" "/org/a11y/bus"
1836 "org.a11y.Bus" "GetAddress")) 1834 "org.a11y.Bus" "GetAddress"))
1837 1835
1838@result{} "unix:abstract=/tmp/dbus-2yzWHOCdSD,guid=a490dd26625870ca1298b6e10000fd7f" 1836@result{} "unix:abstract=/tmp/dbus-2yzWHOCdSD,guid=a490dd26625870ca1298b6e10000fd7f"
1839 1837
@@ -1848,7 +1846,7 @@ Example: You initialize a connection to the AT-SPI bus on your host:
1848 1846
1849@result{} ":1.19" 1847@result{} ":1.19"
1850 1848
1851;; Open a new connection to the same bus. This obsoletes the 1849;; Open a new connection to the same bus. This supersedes the
1852;; previous one. 1850;; previous one.
1853(dbus-init-bus my-bus 'private) 1851(dbus-init-bus my-bus 'private)
1854 1852
@@ -1859,14 +1857,14 @@ Example: You initialize a connection to the AT-SPI bus on your host:
1859@result{} ":1.20" 1857@result{} ":1.20"
1860@end lisp 1858@end lisp
1861 1859
1862D-Bus addresses can specify different transport. A possible address 1860D-Bus addresses can specify a different transport. A possible address
1863could be based on TCP/IP sockets, see next example. However, it 1861could be based on TCP/IP sockets, see next example. Which transport
1864depends on the bus daemon configuration, which transport is supported. 1862is supported depends on the bus daemon configuration, however.
1865@end defun 1863@end defun
1866 1864
1867@defun dbus-setenv bus variable value 1865@defun dbus-setenv bus variable value
1868Set the value of the @var{bus} environment variable @var{variable} to 1866This function sets the value of the @var{bus} environment
1869@var{value}. 1867@var{variable} to @var{value}.
1870 1868
1871@var{bus} is either a Lisp symbol, @code{:system} or @code{:session}, 1869@var{bus} is either a Lisp symbol, @code{:system} or @code{:session},
1872or a string denoting the bus address. Both @var{variable} and 1870or a string denoting the bus address. Both @var{variable} and
@@ -1877,7 +1875,7 @@ function adds to or modifies that environment when activating services.
1877 1875
1878Some bus instances, such as @code{:system}, may disable setting the 1876Some bus instances, such as @code{:system}, may disable setting the
1879environment. In such cases, or if this feature is not available in 1877environment. In such cases, or if this feature is not available in
1880older D-Bus versions, a @code{dbus-error} error is raised. 1878older D-Bus versions, this function signals a @code{dbus-error}.
1881 1879
1882As an example, it might be desirable to start X11 enabled services on 1880As an example, it might be desirable to start X11 enabled services on
1883a remote host's bus on the same X11 server the local Emacs is 1881a remote host's bus on the same X11 server the local Emacs is
@@ -1916,7 +1914,7 @@ Input parameters of @code{dbus-call-method},
1916@code{dbus-register-method}, @code{dbus-register-property} and 1914@code{dbus-register-method}, @code{dbus-register-property} and
1917@code{dbus-register-signal} are checked for correct D-Bus types. If 1915@code{dbus-register-signal} are checked for correct D-Bus types. If
1918there is a type mismatch, the Lisp error @code{wrong-type-argument} 1916there is a type mismatch, the Lisp error @code{wrong-type-argument}
1919@code{D-Bus ARG} is raised. 1917@code{D-Bus @var{arg}} is raised.
1920 1918
1921All errors raised by D-Bus are signaled with the error symbol 1919All errors raised by D-Bus are signaled with the error symbol
1922@code{dbus-error}. If possible, error messages from D-Bus are 1920@code{dbus-error}. If possible, error messages from D-Bus are
@@ -1967,35 +1965,39 @@ There exist convenience functions which could be called inside a
1967callback function in order to retrieve the information from the event. 1965callback function in order to retrieve the information from the event.
1968 1966
1969@defun dbus-event-bus-name event 1967@defun dbus-event-bus-name event
1970Returns the bus name @var{event} is coming from. 1968This function returns the bus name @var{event} is coming from. The
1971The result is either the symbol @code{:system} or the symbol @code{:session}. 1969result is either the symbol @code{:system} or the symbol
1970@code{:session}.
1972@end defun 1971@end defun
1973 1972
1974@defun dbus-event-message-type event 1973@defun dbus-event-message-type event
1975Returns the message type of the corresponding D-Bus message. The 1974This function returns the message type of the corresponding D-Bus
1976result is a natural number. 1975message. The result is a natural number.
1977@end defun 1976@end defun
1978 1977
1979@defun dbus-event-serial-number event 1978@defun dbus-event-serial-number event
1980Returns the serial number of the corresponding D-Bus message. 1979This function returns the serial number of the corresponding D-Bus
1981The result is a natural number. 1980message. The result is a natural number.
1982@end defun 1981@end defun
1983 1982
1984@defun dbus-event-service-name event 1983@defun dbus-event-service-name event
1985Returns the unique name of the D-Bus object @var{event} is coming from. 1984This function returns the unique name of the D-Bus object @var{event}
1985is coming from.
1986@end defun 1986@end defun
1987 1987
1988@defun dbus-event-path-name event 1988@defun dbus-event-path-name event
1989Returns the object path of the D-Bus object @var{event} is coming from. 1989This function returns the object path of the D-Bus object @var{event}
1990is coming from.
1990@end defun 1991@end defun
1991 1992
1992@defun dbus-event-interface-name event 1993@defun dbus-event-interface-name event
1993Returns the interface name of the D-Bus object @var{event} is coming from. 1994This function returns the interface name of the D-Bus object
1995@var{event} is coming from.
1994@end defun 1996@end defun
1995 1997
1996@defun dbus-event-member-name event 1998@defun dbus-event-member-name event
1997Returns the member name of the D-Bus object @var{event} is coming 1999This function returns the member name of the D-Bus object @var{event}
1998from. It is either a signal name or a method name. 2000is coming from. It is either a signal name or a method name.
1999@end defun 2001@end defun
2000 2002
2001D-Bus errors are not propagated during event handling, because it is 2003D-Bus errors are not propagated during event handling, because it is
@@ -2009,7 +2011,7 @@ D-Bus error happens in the event handler. Every function must accept
2009two arguments, the event and the error variable caught in 2011two arguments, the event and the error variable caught in
2010@code{condition-case} by @code{dbus-error}. 2012@code{condition-case} by @code{dbus-error}.
2011 2013
2012Such functions can be used the adapt the error signal to be raised. 2014Such functions can be used to adapt the error signal to be raised.
2013Example: 2015Example:
2014 2016
2015@lisp 2017@lisp
@@ -2019,12 +2021,12 @@ Example:
2019 (message "my-dbus-event-error-handler: %S %S" event error) 2021 (message "my-dbus-event-error-handler: %S %S" event error)
2020 (signal 'file-error (cdr error)))) 2022 (signal 'file-error (cdr error))))
2021 2023
2022(add-hook 'dbus-event-error-functions 'my-dbus-event-error-handler) 2024(add-hook 'dbus-event-error-functions #'my-dbus-event-error-handler)
2023@end lisp 2025@end lisp
2024@end defvar 2026@end defvar
2025 2027
2026Hook functions shall take into account, that there might be other 2028Hook functions should take into account that there might be other
2027D-Bus applications running. Therefore, they shall check carefully, 2029D-Bus applications running. They should therefore check carefully,
2028whether a given D-Bus error is related to them. 2030whether a given D-Bus error is related to them.
2029 2031
2030 2032
diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi
index 83dd176f984..bbfc86b111e 100644
--- a/doc/misc/efaq-w32.texi
+++ b/doc/misc/efaq-w32.texi
@@ -143,7 +143,7 @@ executable, using the MinGW GCC compiler and development tools.
143 143
144@cindex DOS port 144@cindex DOS port
145@cindex Windows 3.11 port 145@cindex Windows 3.11 port
146Emacs can also be compiled for MSDOS. When run on recent MS Windows, 146Emacs can also be compiled for MSDOS@. When run on recent MS Windows,
147it supports long file names, and uses the Windows clipboard. 147it supports long file names, and uses the Windows clipboard.
148See the @file{msdos} directory in the Emacs sources for building 148See the @file{msdos} directory in the Emacs sources for building
149instructions (requires DJGPP). 149instructions (requires DJGPP).
@@ -222,7 +222,7 @@ specific notes about debugging Emacs.
222 222
223@cindex debugging Emacs with GDB 223@cindex debugging Emacs with GDB
224GDB is the GNU debugger, which can be used to debug Emacs when it has 224GDB is the GNU debugger, which can be used to debug Emacs when it has
225been compiled with MinGW GCC. The best results will be obtained if 225been compiled with MinGW GCC@. The best results will be obtained if
226you start gdb from the @file{src} directory as @kbd{gdb ./emacs.exe}. 226you start gdb from the @file{src} directory as @kbd{gdb ./emacs.exe}.
227This will load the init file @file{.gdbinit}@footnote{ 227This will load the init file @file{.gdbinit}@footnote{
228Latest versions of GDB might refuse to load the init file for security 228Latest versions of GDB might refuse to load the init file for security
@@ -592,7 +592,7 @@ Subject: Re: Re[2]: problem with caps/ctrl swap on NT 4.0
592@end ignore 592@end ignore
593@smallexample 593@smallexample
594It's a binary value that lets you map keystrokes in the low-level keyboard 594It's a binary value that lets you map keystrokes in the low-level keyboard
595drivers in NT. As a result you don't have to worry about applications 595drivers in NT@. As a result you don't have to worry about applications
596bypassing mappings that you've done at a higher level (i.e., it just works). 596bypassing mappings that you've done at a higher level (i.e., it just works).
597 597
598Here's the format of the value: 598Here's the format of the value:
@@ -1187,7 +1187,7 @@ A lot of effort has gone into making it easier to print from Emacs on
1187MS Windows, but this has still been insufficient to keep up with 1187MS Windows, but this has still been insufficient to keep up with
1188changes in printing technology from text and postscript based printers 1188changes in printing technology from text and postscript based printers
1189connected via ports that can be accessed directly, to graphical 1189connected via ports that can be accessed directly, to graphical
1190printers that are only accessible via USB. For details, see 1190printers that are only accessible via USB@. For details, see
1191@uref{http://www.emacswiki.org/emacs/PrintingFromEmacs, Emacs 1191@uref{http://www.emacswiki.org/emacs/PrintingFromEmacs, Emacs
1192Wiki}, @uref{http://www.emacswiki.org/emacs/PrintWithWebBrowser}, and 1192Wiki}, @uref{http://www.emacswiki.org/emacs/PrintWithWebBrowser}, and
1193@uref{http://www.emacswiki.org/emacs/PrintFromWindowsExplorer}. 1193@uref{http://www.emacswiki.org/emacs/PrintFromWindowsExplorer}.
@@ -1398,7 +1398,7 @@ default shell in Emacs, you can place the following in your init file:
1398@end example 1398@end example
1399 1399
1400WARNING: Some versions of bash set and use the environment variable 1400WARNING: Some versions of bash set and use the environment variable
1401PID. For some as yet unknown reason, if @env{PID} is set and Emacs 1401PID@. For some as yet unknown reason, if @env{PID} is set and Emacs
1402passes it on to bash subshells, bash dies (Emacs can inherit the 1402passes it on to bash subshells, bash dies (Emacs can inherit the
1403@env{PID} variable if it's started from a bash shell). If you clear 1403@env{PID} variable if it's started from a bash shell). If you clear
1404the @env{PID} variable in your init file, you should be able to 1404the @env{PID} variable in your init file, you should be able to
@@ -1890,9 +1890,9 @@ need to use.
1890@node MSVC 1890@node MSVC
1891@section How do I use Emacs with Microsoft Visual C++ 1891@section How do I use Emacs with Microsoft Visual C++
1892 1892
1893There are two ways you can use Emacs in conjunction with MSVC. You 1893There are two ways you can use Emacs in conjunction with MSVC@. You
1894can use Emacs as the editor, and do everything else in the DevStudio 1894can use Emacs as the editor, and do everything else in the DevStudio
1895IDE. Or you can use Emacs as an IDE, calling the MSVC command line 1895IDE@. Or you can use Emacs as an IDE, calling the MSVC command line
1896tools to build your project. 1896tools to build your project.
1897 1897
1898@menu 1898@menu
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index be1ffc026dd..0290e797065 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -1125,7 +1125,7 @@ scanning of @code{#define}d symbols.
1125 1125
1126@cindex xref 1126@cindex xref
1127@item 1127@item
1128New package Xref replaces Etags's front-end and UI. Xref provides a 1128New package Xref replaces Etags's front-end and UI@. Xref provides a
1129generic framework and new commands to find and move to definitions of 1129generic framework and new commands to find and move to definitions of
1130functions, macros, data structures etc., as well as go back to the 1130functions, macros, data structures etc., as well as go back to the
1131location where you were before moving to a definition. It supersedes 1131location where you were before moving to a definition. It supersedes
diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi
index c3e69178fca..bb13ebdf238 100644
--- a/doc/misc/emacs-gnutls.texi
+++ b/doc/misc/emacs-gnutls.texi
@@ -134,7 +134,7 @@ order: @file{/etc/ssl/certs/ca-certificates.crt} for Debian, Ubuntu,
134Gentoo and Arch Linux; @file{/etc/pki/tls/certs/ca-bundle.crt} for 134Gentoo and Arch Linux; @file{/etc/pki/tls/certs/ca-bundle.crt} for
135Fedora and RHEL; @file{/etc/ssl/ca-bundle.pem} for Suse; 135Fedora and RHEL; @file{/etc/ssl/ca-bundle.pem} for Suse;
136@file{/usr/ssl/certs/ca-bundle.crt} for Cygwin; 136@file{/usr/ssl/certs/ca-bundle.crt} for Cygwin;
137@file{/usr/local/share/certs/ca-root-nss.crt} for FreeBSD. You can 137@file{/usr/local/share/certs/ca-root-nss.crt} for FreeBSD@. You can
138easily customize @code{gnutls-trustfiles} to be something else, but 138easily customize @code{gnutls-trustfiles} to be something else, but
139let us know if you do, so we can make the change to benefit the other 139let us know if you do, so we can make the change to benefit the other
140users of that platform. 140users of that platform.
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi
index fd285396c40..9c1d2d0160a 100644
--- a/doc/misc/gnus-faq.texi
+++ b/doc/misc/gnus-faq.texi
@@ -689,8 +689,9 @@ retrieves via POP3?
689@subsubheading Answer 689@subsubheading Answer
690 690
691Yes, if the POP3 server supports the UIDL control (maybe almost servers 691Yes, if the POP3 server supports the UIDL control (maybe almost servers
692do it nowadays). To do that, add a @code{:leave VALUE} pair to each 692do it nowadays). To do that, add a @code{:leave @var{value}} pair to
693POP3 mail source. @xref{Mail Source Specifiers}, for details on VALUE. 693each POP3 mail source. @xref{Mail Source Specifiers}, for details on
694@var{value}.
694 695
695@node FAQ 4 - Reading messages 696@node FAQ 4 - Reading messages
696@subsection Reading messages 697@subsection Reading messages
diff --git a/doc/misc/message.texi b/doc/misc/message.texi
index f9527ee7864..bdd31b1fe49 100644
--- a/doc/misc/message.texi
+++ b/doc/misc/message.texi
@@ -1116,7 +1116,7 @@ is used.
1116 1116
1117The choice between EasyPG and OpenSSL is controlled by the variable 1117The choice between EasyPG and OpenSSL is controlled by the variable
1118@code{mml-smime-use}, which needs to be set to the value @code{epg} 1118@code{mml-smime-use}, which needs to be set to the value @code{epg}
1119for EasyPG. Depending on your version of Emacs that value may be the 1119for EasyPG@. Depending on your version of Emacs that value may be the
1120default; if not, you can either customize that variable or place the 1120default; if not, you can either customize that variable or place the
1121following line in your @file{.emacs} file (that line needs to be 1121following line in your @file{.emacs} file (that line needs to be
1122placed above other code related to message/gnus/encryption): 1122placed above other code related to message/gnus/encryption):
@@ -1232,7 +1232,7 @@ decryption/sign operation. @xref{Agent Options, , , gnupg, Using the
1232GNU Privacy Guard}. 1232GNU Privacy Guard}.
1233 1233
1234How to use @command{gpg-agent} in Emacs depends on your version of 1234How to use @command{gpg-agent} in Emacs depends on your version of
1235GnuPG. With GnuPG version 2.1, @command{gpg-agent} is started 1235GnuPG@. With GnuPG version 2.1, @command{gpg-agent} is started
1236automatically if necessary. With older versions you may need to run 1236automatically if necessary. With older versions you may need to run
1237the following command from the shell before starting Emacs. 1237the following command from the shell before starting Emacs.
1238 1238
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index eb0bf743bec..feead3d0a76 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2046,6 +2046,12 @@ reestablished. A value of @code{nil} disables this feature. Most of
2046the methods do not set this property except the @option{sudo} and 2046the methods do not set this property except the @option{sudo} and
2047@option{doas} methods, which use predefined values. 2047@option{doas} methods, which use predefined values.
2048 2048
2049@item @t{"tmpdir"}
2050
2051The temporary directory on the remote host. If not specified, the
2052default value is @t{"/data/local/tmp"} for the @option{adb} method,
2053@t{"/C$/Temp"} for the @option{smb} method, and @t{"/tmp"} otherwise.
2054
2049@item @t{"posix"} 2055@item @t{"posix"}
2050 2056
2051Connections using the @option{smb} method check, whether the remote 2057Connections using the @option{smb} method check, whether the remote