jwiegley / alert

A Growl-like alerts notifier for Emacs
Other
441 stars 66 forks source link

:persistent doesn't work with libnotify #80

Open TatriX opened 5 years ago

TatriX commented 5 years ago

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.

jwiegley commented 5 years ago

Sounds like a good bug, thanks for finding it.

bezirg commented 4 years ago

: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

bezirg commented 4 years ago

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"
amygrinn commented 2 years ago

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.

codygman commented 2 years ago

@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