alert
alert copied to clipboard
:persistent doesn't work with libnotify
When I set
(setq alert-default-style 'libnotify)
and then run
(alert "something" :persistent t)
notification is shown, but it disappears after I guess alert-fade-time.
But if I pass :style explicitly it works just fine.
(alert "something" :persistent t :style 'libnotify)
It looks like it shoudn't be like this.
Sounds like a good bug, thanks for finding it.
:persistent also does not work for me with the notifications style backend. After a bit of debugging it seems that the :persistent is never passed to the alert-notifications-notify notifier function
Custom styles using alert-define-style are also unaware of the :persistent kwarg. Example:
(alert-define-style 'style-name :title "My Style's title"
:notifier
(lambda (info)
(plist-get info :message)
(message (if (plist-get info :persistent) "ok" "nope"))))
(alert "mpla" :persistent t)
"nope"
I found the fix: https://github.com/jwiegley/alert/blob/master/alert.el#L1086
If you add :persistent persistent to this list it will work.
@tylergrinn Thanks, I was wondering what was wrong! This should get merged in right @jwiegley ?
Or is the issue fixed by #31? The above fix seems necessary to even pass through the persistent value which I confirmed in debugging isn't passed along.
Edit: did this fix in #97