jwiegley / alert

A Growl-like alerts notifier for Emacs
Other
443 stars 67 forks source link

Minor mode to allow users to override the builtin `notifications-notify` command with `alert`? #104

Open gsingh93 opened 1 year ago

gsingh93 commented 1 year ago

An issue I've come across in a few different packages now is that they use the builtin notifications library. But as far as I know, this doesn't work on macOS. As suggested here, this can be solved with define-advice:

(define-advice notifications-notify
    (:override (&rest params) using-alert)
  (alert (plist-get params :body)
         :title (plist-get params :title)))

In that same comment, the author suggested a minor-mode that would enable this configuration for you. What do you think about this? While I could just copy this snippet into my config, I feel like this affects a wide variety of packages and users, so a minor mode might make sense.