I upgraded Org from the built-in 9.1.9 to the maint branch 9.3.3 (directions here). I now get this error when I clock in or out:
Debugger entered--Lisp error: (dbus-error "Emacs not compiled with dbus support") signal(dbus-error ("Emacs not compiled with dbus support")) dbus-call-method(:session "org.freedesktop.Notifications" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "Notify" :string "Emacs" :uint32 0 :string "/Applications/Emacs.app/Contents/Resources/etc/images/icons/hicolor/scalable/apps/emacs.svg" :string "Org mode message" :string "Task ‘zero email inbox’ should be finished by now. (0:30)" (:array) ((:dict-entry "urgency" (:variant :byte 0))) :int32 3000) notifications-notify(:title "Org mode message" :body "Task ‘zero email inbox’ should be finished by now. (0:30)" :timeout 3000 :urgency low) org-show-notification("Task ‘zero email inbox’ should be finished by now. (0:30)") org-notify("Task ‘zero email inbox’ should be finished by now. (0:30)" nil) org-clock-notify-once-if-expired() org-clock-update-mode-line() org-clock-in(nil) funcall-interactively(org-clock-in nil) call-interactively(org-clock-in nil nil) command-execute(org-clock-in)
From the depth of the error in the stack trace, I think this is a bug with Org mode or an incompatibility with my system (Emacs 26.3 (9.0) and macOS Mojave 10.14.6). I tried to catch the error with:
(condition-case nil
(org-clock-in)
(message "caught error clocking in"))
and I still get the error.
Is this a bug I should report? How can I silence it in the meantime?
notifications-notify
with(fmakunbound 'notifications-notify)
: that should stop the errors. For a more permanent fix, you could rebuild your emacs with dbus support:./configure --with-dbus && make
but that assumes you build your emacs from source. It does look like a bug however thatnotifications
is loaded even though the underlying emacs is not built with dbus support. A bug report to the emacs bug list is probably a good idea.(add-to-list 'load-path "~/code/org-mode/lisp") (require 'org-loaddefs) (fmakunbound 'notifications-notify)
and am still getting the same error.notifications-notify
is not a variable or a function. How can I verify its value before and after that command?(fmakunbound 'notififications-notify)
and try again: it may be that whatever was causingnotifications.el
to be loaded is no longer doing that.notifications.el
is not loaded yet, but it will probably be loaded later on and you'll have the original problem. If that's the case, then try(eval-after-load 'notifications (fmakunbound 'notifications-notify))
in your init file. That will wait untilnotifications.el
is loaded before trying to unbind the function cell ofnotifications-notify
. But again, this is a band-aid: you'll need to find out how and whynotifications
is loaded.