Use custom function for new email alert

This commit is contained in:
contrapunctus 2022-02-17 13:35:24 +05:30
parent 500b983242
commit d6940b2da9
1 changed files with 5 additions and 3 deletions

View File

@ -3122,10 +3122,12 @@ PR ideas
#+END_SRC
**** mu4e-alert
Even the patched version of =mu4e-alert= I'm using is not completely bug-free - many a times I get new mail, =imapnotify= detects it and runs =mbsync=, the =mu4e-index-updated-hook= is run (since the alert in =my-mail-alert= is displayed), and it contains =mu4e-alert-notify-unread-mail-async=...but I don't get an alert from =mu4e-alert= 🙁
#+BEGIN_SRC emacs-lisp
;; (defun my-test-fn ()
;; (alert "mu4e-index-updated-hook was run"))
;; (add-hook 'mu4e-index-updated-hook #'my-test-fn)
(defun my-mail-alert ()
(alert "You've got mail!"))
(add-hook 'mu4e-index-updated-hook #'my-mail-alert)
(use-package mu4e-alert
:quelpa (mu4e-alert :fetcher github :repo "xzz53/mu4e-alert")