Merge branch 'prevent-notify-error'

This commit is contained in:
Ryan C. Thompson 2012-03-05 08:47:00 -08:00
commit 676fa8f71f
2 changed files with 13 additions and 5 deletions

View File

@ -55,13 +55,12 @@ fallback."
(defun el-get-notify (title message)
"Notify the user using either the dbus based API or the `growl' one"
(when (not (eq el-get-notify-type 'message))
(if (fboundp 'dbus-register-signal)
;; avoid a bug in Emacs 24.0 under darwin
(require 'notifications nil t)
(unless (and (fboundp 'dbus-register-signal)
;; avoid a bug in Emacs 24.0 under darwin
(ignore-errors (require 'notifications nil t)))
;; else try notify.el, there's a recipe for it
(unless (fboundp 'notify)
(when (featurep 'notify)
(require 'notify)))))
(ignore-errors (require 'notify nil 'noerror)))))
(condition-case nil
(progn

9
test/el-get-issue-628.el Normal file
View File

@ -0,0 +1,9 @@
;; Set a broken value for the session bus address
(setenv "DBUS_SESSION_BUS_ADDRESS"
"unix:abstract=/tmpX/Xdbus-oBU7t7f9Pv,guid=X7bb736a5c60b6c3be8a1312800000064X")
;; Trigger a notification
(let ((el-get-sources
(list '(:name pkg
:type builtin))))
(el-get 'sync 'pkg))