emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] erc-desktop-notification include channel name


From: Alberto Donato
Subject: Re: [PATCH] erc-desktop-notification include channel name
Date: Sun, 11 Jun 2017 10:29:57 +0200

Hi,
  is this the right place to submit patches for ERC?

Thanks,
-Alberto

On Mon, May 29, 2017 at 12:36 PM, Alberto Donato
<address@hidden> wrote:
> Optionally include the channel name for 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]