alert icon indicating copy to clipboard operation
alert copied to clipboard

:persistent doesn't work with libnotify

Open TatriX opened this issue 6 years ago • 5 comments

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.

TatriX avatar Jan 23 '19 11:01 TatriX

Sounds like a good bug, thanks for finding it.

jwiegley avatar Jan 23 '19 16:01 jwiegley

: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 avatar Apr 16 '20 19:04 bezirg

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"

bezirg avatar Apr 16 '20 20:04 bezirg

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.

amygrinn avatar Oct 23 '21 21:10 amygrinn

@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

codygman avatar Jan 05 '22 00:01 codygman