emacs data-provider should handle dbus errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Data-Sources |
Fix Committed
|
Low
|
Siegfried Gevatter |
Bug Description
My screen-based emacs's DBUS_SESSION_
This patch reduces the annoyance a bit:
--- emacs/zeitgeist.el 2011-05-04 18:57:00 +0000
+++ emacs/zeitgeist.el 2011-05-09 09:59:08 +0000
@@ -26,12 +26,14 @@
(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.
- "/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-
"Get the timestamp in zeitgeist format."
Related branches
Changed in zeitgeist-dataproviders: | |
assignee: | nobody → Siegfried Gevatter (rainct) |
importance: | Undecided → Low |
milestone: | none → 0.8.0 |
status: | New → Confirmed |
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."