[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-discuss] [PATCH] erc-desktop-notification include channel name
From: |
Alberto Donato |
Subject: |
[Erc-discuss] [PATCH] erc-desktop-notification include channel name |
Date: |
Tue, 8 Aug 2017 17:49:54 +0200 |
This adds an option to include the channel name in ERC notifications.
diff --git a/lisp/erc/erc-desktop-notifications.el
b/lisp/erc/erc-desktop-notifications.el
index 113f1cf..8f18bed 100644
--- a/lisp/erc/erc-desktop-notifications.el
+++ b/lisp/erc/erc-desktop-notifications.el
@@ -52,6 +52,11 @@
:group 'erc-notifications
:type '(choice (const :tag "Session bus" :session) string))
+(defcustom erc-notifications-include-channel nil
+ "Include channel name in notifications."
+ :group 'erc-notifications
+ :type 'bool)
+
(defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors
(defun erc-notifications-notify (nick msg)
@@ -83,6 +88,8 @@ This will replace the last notification sent with
this function."
(unless (or (string-match-p "^Server:" nick)
(when (boundp 'erc-track-exclude)
(member nick erc-track-exclude)))
+ (when erc-notifications-include-channel
+ (setq nick (format "%s (%s)" nick (buffer-name))))
(erc-notifications-notify nick msg)))))
;;;###autoload(autoload 'erc-notifications-mode
"erc-desktop-notifications" "" t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Erc-discuss] [PATCH] erc-desktop-notification include channel name,
Alberto Donato <=