Public bug reported:

My screen-based emacs's DBUS_SESSION_BUS_ADDRESS environment variable
got superceded, and though emacs was fine and could open frames in the
new session, it was very naughty about opening, saving, and closing
files/buffers because the dbus-call-method in zeitgeist.el was failing.

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.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."

** Affects: zeitgeist-dataproviders
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Data-Sources.
https://bugs.launchpad.net/bugs/779831

Title:
  emacs data-provider should handle dbus errors

Status in Zeitgeist Data-Providers:
  New

Bug description:
  My screen-based emacs's DBUS_SESSION_BUS_ADDRESS environment variable
  got superceded, and though emacs was fine and could open frames in the
  new session, it was very naughty about opening, saving, and closing
  files/buffers because the dbus-call-method in zeitgeist.el was
  failing.

  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.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."

_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to     : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp

Reply via email to