[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposed changes to gnus-notifications.el
From: |
Basil L. Contovounesios |
Subject: |
Re: Proposed changes to gnus-notifications.el |
Date: |
Sun, 21 Jul 2019 10:40:03 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Michael Albinus <address@hidden> writes:
> The patch seems to assume that notifications-notify works
> everywhere. That's not the case, since it depends on D-Bus it runs only
> for GNU/Linux systems.
Thank you for pointing this out. I had wondered about it while
preparing the patch but could not find a description of what happens
when notifications are not supported, other than the usual
"notifications-notify returns an integer ID".
Does notifications-notify return nil in this case? If so, I would like
to document this. If not, wouldn't this make sense?
What is the best way to determine whether notifications are supported by
the current Emacs instance? I skimmed through (info "(dbus) Top") and
(info "(elisp) Desktop Notifications"), as well as through the syms of
dbusbind.c, dbus.el, and notifications.el, but did not find any clear
answers.
Currently, gnus-notifications.el checks a) directly whether
notifications-notify is fboundp, and b) indirectly whether
notifications-notify returns nil. Even without notification support,
(a) should always be true after loading the library, right? So the
question is whether (b) is a sufficient condition.
PS Should gnus-notifications.el be extended to support
w32-notification-notify?
PPS Would it be possible/welcome to provide a common interface for both
notifications-notify and w32-notification-notify? At the moment it
sounds like programmers need to choose between the two depending on
system-type.
Thanks,
--
Basil
Re: Proposed changes to gnus-notifications.el, Lars Ingebrigtsen, 2019/07/21