jwiegley / alert

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

Parameter `:style` is not handled correctly #92

Open jcguu95 opened 3 years ago

jcguu95 commented 3 years ago

The parameter :style isn't handled correctly, so the behavior of #'alert is overwritten by the default style for some users. That maybe why some users don't receive system notifications as pointed out in

  1. https://github.com/jwiegley/alert/issues/74
  2. https://github.com/jwiegley/alert/issues/47

See the following test.

alert-default-style   ;; => message

(alert "Hi")                                   ;; => It uses message style.
(alert "Hi" :style 'libnotify)                 ;; => It uses message style.
(alert "Hi" :style 'message)                   ;; => It uses message style.

(setq alert-default-style 'libnotify)

(alert "Hi")                                   ;; => It uses libnotify style.
(alert "Hi" :style 'libnotify)                 ;; => It uses libnotify style.
(alert "Hi" :style 'message)                   ;; => It uses libnotify style.

Temporary solution

(setq alert-default-style 'libnotify) ;; Or replace "libnotify" by your favorite style.
dalanicolai commented 3 years ago

The cause of this bug is that the dolist form in the alert function receives an empty list. Until the fix gets merged you can fix it by adding (alert-add-rule) to your dotfile.

jcguu95 commented 3 years ago

Thanks for the comment and commits! I'm willing to test whenever you think its ready!