alert icon indicating copy to clipboard operation
alert copied to clipboard

Parameter `:style` is not handled correctly

Open jcguu95 opened this issue 5 years ago • 2 comments

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.

jcguu95 avatar Dec 18 '20 16:12 jcguu95

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.

dalanicolai avatar Feb 18 '21 23:02 dalanicolai

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

jcguu95 avatar Mar 24 '21 21:03 jcguu95