From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: Julien Danjou <julien@danjou.info>,
Lars Ingebrigtsen <larsi@gnus.org>,
emacs-devel@gnu.org
Subject: Re: Proposed changes to gnus-notifications.el
Date: Sun, 21 Jul 2019 10:40:03 +0100 [thread overview]
Message-ID: <87wogbraj0.fsf@tcd.ie> (raw)
In-Reply-To: <87blxnke8f.fsf@gmx.de> (Michael Albinus's message of "Sun, 21 Jul 2019 10:01:52 +0200")
Michael Albinus <michael.albinus@gmx.de> 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
next prev parent reply other threads:[~2019-07-21 9:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-21 0:52 Proposed changes to gnus-notifications.el Basil L. Contovounesios
2019-07-21 8:01 ` Michael Albinus
2019-07-21 9:40 ` Basil L. Contovounesios [this message]
2019-07-21 10:40 ` Michael Albinus
2019-07-21 15:54 ` Basil L. Contovounesios
2019-07-21 17:16 ` Michael Albinus
2019-07-21 15:55 ` Error handling in notifications-notify (was: Proposed changes to gnus-notifications.el) Basil L. Contovounesios
2019-07-21 17:21 ` Error handling in notifications-notify Michael Albinus
2019-07-21 14:34 ` Proposed changes to gnus-notifications.el Eli Zaretskii
2019-07-21 13:44 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wogbraj0.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=emacs-devel@gnu.org \
--cc=julien@danjou.info \
--cc=larsi@gnus.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.