aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2014-11-23 10:00:28 +0100
committerMichael Albinus2014-11-23 10:00:28 +0100
commit709a5173cd98d1e67724d1d02c437fa63681c3b6 (patch)
tree0c2a289089d10c1f00ed813176163267a6c093f2
parent116be2828b1c36a02471019d6a6ed68b67a32497 (diff)
downloademacs-709a5173cd98d1e67724d1d02c437fa63681c3b6.tar.gz
emacs-709a5173cd98d1e67724d1d02c437fa63681c3b6.zip
* erc-desktop-notifications.el (erc-notifications-bus):
New customer option. Supports cases when Emacs hasn't been invoked in the same environment where the notifications shall go to. (erc-notifications-notify): Use it.
-rw-r--r--lisp/erc/ChangeLog7
-rw-r--r--lisp/erc/erc-desktop-notifications.el9
2 files changed, 15 insertions, 1 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 9b8ec66ff55..2004de41d0b 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,10 @@
12014-11-23 Michael Albinus <michael.albinus@gmx.de>
2
3 * erc-desktop-notifications.el (erc-notifications-bus):
4 New customer option. Supports cases when Emacs hasn't been
5 invoked in the same environment where the notifications shall go to.
6 (erc-notifications-notify): Use it.
7
12014-11-10 Kelvin White <kwhite@gnu.org> 82014-11-10 Kelvin White <kwhite@gnu.org>
2 9
3 * erc-stamp.el (erc-timestamp-intangible): Change version tag to 24.5. 10 * erc-stamp.el (erc-timestamp-intangible): Change version tag to 24.5.
diff --git a/lisp/erc/erc-desktop-notifications.el b/lisp/erc/erc-desktop-notifications.el
index c0362b773dd..c8945cf9319 100644
--- a/lisp/erc/erc-desktop-notifications.el
+++ b/lisp/erc/erc-desktop-notifications.el
@@ -46,6 +46,12 @@
46 :group 'erc-notifications 46 :group 'erc-notifications
47 :type '(choice (const :tag "No icon" nil) file)) 47 :type '(choice (const :tag "No icon" nil) file))
48 48
49(defcustom erc-notifications-bus :session
50 "D-Bus bus to use for notification."
51 :version "24.5"
52 :group 'erc-notifications
53 :type '(choice (const :tag "Session bus" :session) string))
54
49(defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors 55(defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors
50 56
51(defun erc-notifications-notify (nick msg) 57(defun erc-notifications-notify (nick msg)
@@ -53,7 +59,8 @@
53This will replace the last notification sent with this function." 59This will replace the last notification sent with this function."
54 (dbus-ignore-errors 60 (dbus-ignore-errors
55 (setq erc-notifications-last-notification 61 (setq erc-notifications-last-notification
56 (notifications-notify :title (xml-escape-string nick) 62 (notifications-notify :bus erc-notifications-bus
63 :title (xml-escape-string nick)
57 :body (xml-escape-string msg) 64 :body (xml-escape-string msg)
58 :replaces-id erc-notifications-last-notification 65 :replaces-id erc-notifications-last-notification
59 :app-icon erc-notifications-icon)))) 66 :app-icon erc-notifications-icon))))