(defun zeitgeist-call (method &rest args)
"Call the zeitgeist method METHOD with ARGS over dbus"
- (apply 'dbus-call-method
- :session ; use the session (not system) bus
- "org.gnome.zeitgeist.Engine" ; service name
- "/org/gnome/zeitgeist/log/activity" ; path name
- "org.gnome.zeitgeist.Log" ; interface name
- method args))
+ (condition-case err
+ (apply 'dbus-call-method
+ :session ; use the session (not system) bus
+ "org.gnome.zeitgeist.Engine" ; service name
+ "/org/gnome/zeitgeist/log/activity" ; path name
+ "org.gnome.zeitgeist.Log" ; interface name
+ method args)
+ (dbus-error (message (format "zeitgeist-call %s failed due to D-Bus error %s" method err)))))
(defun zeitgeist-event-timestamp ()
"Get the timestamp in zeitgeist format."
Sorry, flubbed one set of parens in condition-case when rebasing to latest zeitgeist.el; Here's the right diff:
=== modified file 'emacs/ zeitgeist. el'
--- emacs/zeitgeist.el 2011-05-04 18:57:00 +0000
+++ emacs/zeitgeist.el 2011-05-09 14:36:21 +0000
@@ -26,12 +26,14 @@
(defun zeitgeist-call (method &rest args) zeitgeist. Engine" ; service name zeitgeist/ log/activity" ; path name zeitgeist. Log" ; interface name zeitgeist. Engine" ; service name zeitgeist/ log/activity" ; path name zeitgeist. Log" ; interface name
"Call the zeitgeist method METHOD with ARGS over dbus"
- (apply 'dbus-call-method
- :session ; use the session (not system) bus
- "org.gnome.
- "/org/gnome/
- "org.gnome.
- method args))
+ (condition-case err
+ (apply 'dbus-call-method
+ :session ; use the session (not system) bus
+ "org.gnome.
+ "/org/gnome/
+ "org.gnome.
+ method args)
+ (dbus-error (message (format "zeitgeist-call %s failed due to D-Bus error %s" method err)))))
(defun zeitgeist- event-timestamp ()
"Get the timestamp in zeitgeist format."