From: Amin Bandali Date: Sat, 18 Jan 2020 03:33:03 +0000 (-0500) Subject: Fix the notification action for PRIVMSG in erc-notifications-notify X-Git-Tag: emacs-27.0.90~139 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=db4436eaf97718a1d24117ee082361c0cb854b8b;p=emacs.git Fix the notification action for PRIVMSG in erc-notifications-notify * lisp/erc/erc-desktop-notifications.el (erc-notifications-notify): explicitly request the buffer for `nick', rather than relying on (current-buffer) returning it. That works fine for the very first PRIVMSG sent by `nick', but ERC seems to handle subsequent PRIVMSGs differently, where (current-buffer) would return the server buffer rather than the existing buffer for PRIVMSGs from `nick'. --- diff --git a/lisp/erc/erc-desktop-notifications.el b/lisp/erc/erc-desktop-notifications.el index d8b09324a65..61412e0918d 100644 --- a/lisp/erc/erc-desktop-notifications.el +++ b/lisp/erc/erc-desktop-notifications.el @@ -60,7 +60,7 @@ This will replace the last notification sent with this function." (dbus-ignore-errors (setq erc-notifications-last-notification - (let ((channel (current-buffer))) + (let ((channel (erc-get-buffer nick))) (notifications-notify :bus erc-notifications-bus :title (format "%s in %s" (xml-escape-string nick)