]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the notification action for PRIVMSG in erc-notifications-notify
authorAmin Bandali <mab@gnu.org>
Sat, 18 Jan 2020 03:33:03 +0000 (22:33 -0500)
committerAmin Bandali <mab@gnu.org>
Sat, 18 Jan 2020 03:44:49 +0000 (22:44 -0500)
* 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'.

lisp/erc/erc-desktop-notifications.el

index d8b09324a65d29f35f4043263dab55c09b741950..61412e0918d47c0b8036f2f3e99a54949960b953 100644 (file)
@@ -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)