2

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?

8
  • /me prays for org mode to not turn into a bloatware
    – Flint
    Commented Feb 12, 2020 at 15:21
  • 1
    You can unbind 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 that notifications 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.
    – NickD
    Commented Feb 12, 2020 at 16:23
  • @NickD I load the new Org mode with (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?
    – emonigma
    Commented Feb 16, 2020 at 11:25
  • That's not the same error: this indicates that the symbol is not defined, so get rid of the (fmakunbound 'notififications-notify) and try again: it may be that whatever was causing notifications.el to be loaded is no longer doing that.
    – NickD
    Commented Feb 16, 2020 at 12:49
  • Actually, it probably means that at that point, 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 until notifications.el is loaded before trying to unbind the function cell of notifications-notify. But again, this is a band-aid: you'll need to find out how and why notifications is loaded.
    – NickD
    Commented Feb 17, 2020 at 3:32

1 Answer 1

2

At least in the more recent version of org-mode (9.4.4), one can fix this issue by modifying the variable org-show-notification-handler, e.g., by adding the following to the init file:

(setq org-show-notification-handler 'message)

org notifications (e.g., alerts related to clocking and effort) are then displayed at the bottom of the screen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.