all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* w32-notification-notify and HAVE_DBUS
       [not found] <878ra062ua.fsf.ref@yahoo.com>
@ 2023-08-24 12:29 ` Po Lu
  2023-08-24 12:50   ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Po Lu @ 2023-08-24 12:29 UTC (permalink / raw)
  To: emacs-devel

The Windows tray notification things are conditioned upon #ifndef
HAVE_DBUS.

}

#if defined WINDOWSNT && !defined HAVE_DBUS

/***********************************************************************

This appears to be an oversight, given that the function does not clash
with D-Bus or XDG desktop notification support.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-24 12:29 ` w32-notification-notify and HAVE_DBUS Po Lu
@ 2023-08-24 12:50   ` Eli Zaretskii
  2023-08-24 13:01     ` Po Lu
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-08-24 12:50 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Date: Thu, 24 Aug 2023 20:29:17 +0800
> 
> The Windows tray notification things are conditioned upon #ifndef
> HAVE_DBUS.
> 
> }
> 
> #if defined WINDOWSNT && !defined HAVE_DBUS
> 
> /***********************************************************************
> 
> This appears to be an oversight, given that the function does not clash
> with D-Bus or XDG desktop notification support.

D-Bus provides its own incompatible notifications, and some people
evidently build Emacs for Windows with D-Bus support.  That's why it
is conditioned by D-Bus.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-24 12:50   ` Eli Zaretskii
@ 2023-08-24 13:01     ` Po Lu
  2023-08-24 14:38       ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Po Lu @ 2023-08-24 13:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> D-Bus provides its own incompatible notifications

How are they incompatible when two distinct functions provide them?



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-24 13:01     ` Po Lu
@ 2023-08-24 14:38       ` Eli Zaretskii
  2023-08-25  0:26         ` Po Lu
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-08-24 14:38 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 24 Aug 2023 21:01:35 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > D-Bus provides its own incompatible notifications
> 
> How are they incompatible when two distinct functions provide them?

The notifications they support are different and look differently.
Compare notifications-notify in notifications.el with
w32-notification-notify.  But some of the symbols in these two
notification mechanisms clash, see

  https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01265.html

In general, w32-notification-notify was designed and implemented as a
subset of notifications-notify, which requires D-Bus, so if D-Bus is
actually compiled in, the fallback is not needed.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-24 14:38       ` Eli Zaretskii
@ 2023-08-25  0:26         ` Po Lu
  2023-08-25  5:35           ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Po Lu @ 2023-08-25  0:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> The notifications they support are different and look differently.
> Compare notifications-notify in notifications.el with
> w32-notification-notify.  But some of the symbols in these two
> notification mechanisms clash, see
>
>   https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01265.html

Wasn't that fixed by renaming QCdbus_notify to QCnotify?

> In general, w32-notification-notify was designed and implemented as a
> subset of notifications-notify, which requires D-Bus, so if D-Bus is
> actually compiled in, the fallback is not needed.

D-Bus, being a mechanism for desktop components to exchange information
and procedure calls, provides no desktop notifications by itself, and a
desktop notification server (normally supplied by an X desktop
environment) must run on the session bus for them to be available.

MS-Windows builds with D-Bus are typically incapable of contacting a
notification server, since none of the popular X desktop environments
run on MS-Windows.

So both features should be made available simultaneously.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-25  0:26         ` Po Lu
@ 2023-08-25  5:35           ` Eli Zaretskii
  2023-08-25  6:35             ` Po Lu
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-08-25  5:35 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 25 Aug 2023 08:26:38 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > The notifications they support are different and look differently.
> > Compare notifications-notify in notifications.el with
> > w32-notification-notify.  But some of the symbols in these two
> > notification mechanisms clash, see
> >
> >   https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01265.html
> 
> Wasn't that fixed by renaming QCdbus_notify to QCnotify?
> 
> > In general, w32-notification-notify was designed and implemented as a
> > subset of notifications-notify, which requires D-Bus, so if D-Bus is
> > actually compiled in, the fallback is not needed.
> 
> D-Bus, being a mechanism for desktop components to exchange information
> and procedure calls, provides no desktop notifications by itself, and a
> desktop notification server (normally supplied by an X desktop
> environment) must run on the session bus for them to be available.

Sorry, I don't understand the above.  You seem to be saying that
notifications are unrelated to D-Bus?  But doesn't
notifications-notify work by using D-Bus capabilities?

> MS-Windows builds with D-Bus are typically incapable of contacting a
> notification server, since none of the popular X desktop environments
> run on MS-Windows.
> 
> So both features should be made available simultaneously.

From my POV, w32-notification-notify thingy is not important enough to
care about it.  Newer Windows versions moved to a completely different
machinery for desktop notifications, which Emacs doesn't support (and
AFAICT cannot support, as using them requires C++).  In all the years
since I wrote that code, I've heard no complaints and no evidence of
this feature being used by anyone.  So I see no reason to risk
potential problems by removing the condition.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-25  5:35           ` Eli Zaretskii
@ 2023-08-25  6:35             ` Po Lu
  2023-08-25  7:17               ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Po Lu @ 2023-08-25  6:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Sorry, I don't understand the above.  You seem to be saying that
> notifications are unrelated to D-Bus?  But doesn't
> notifications-notify work by using D-Bus capabilities?

That's what I'm trying to articulate, yes.  notifications-notify merely
employs D-Bus in the role of a mechanism for communicating with the
desktop environment; D-Bus itself doesn't provide notifications itself.

> From my POV, w32-notification-notify thingy is not important enough to
> care about it.  Newer Windows versions moved to a completely different
> machinery for desktop notifications, which Emacs doesn't support (and
> AFAICT cannot support, as using them requires C++).  In all the years
> since I wrote that code, I've heard no complaints and no evidence of
> this feature being used by anyone.  So I see no reason to risk
> potential problems by removing the condition.

The catalyst for my question was an inquiry by a user regarding the
absence of `w32-notification-notify' from a Windows build with D-Bus.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-25  6:35             ` Po Lu
@ 2023-08-25  7:17               ` Eli Zaretskii
  2023-08-25  7:28                 ` Po Lu
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-08-25  7:17 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 25 Aug 2023 14:35:22 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Sorry, I don't understand the above.  You seem to be saying that
> > notifications are unrelated to D-Bus?  But doesn't
> > notifications-notify work by using D-Bus capabilities?
> 
> That's what I'm trying to articulate, yes.  notifications-notify merely
> employs D-Bus in the role of a mechanism for communicating with the
> desktop environment; D-Bus itself doesn't provide notifications itself.

OK, but still, D-Bus is required to have notifications-notify work,
right?

> > From my POV, w32-notification-notify thingy is not important enough to
> > care about it.  Newer Windows versions moved to a completely different
> > machinery for desktop notifications, which Emacs doesn't support (and
> > AFAICT cannot support, as using them requires C++).  In all the years
> > since I wrote that code, I've heard no complaints and no evidence of
> > this feature being used by anyone.  So I see no reason to risk
> > potential problems by removing the condition.
> 
> The catalyst for my question was an inquiry by a user regarding the
> absence of `w32-notification-notify' from a Windows build with D-Bus.

You can tell them that they don't want w32-notification-notify when
D-Bus is available, since the latter is superior, AFAIU.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-25  7:17               ` Eli Zaretskii
@ 2023-08-25  7:28                 ` Po Lu
  2023-08-25 10:18                   ` Eli Zaretskii
  2023-08-25 10:37                   ` Michael Albinus
  0 siblings, 2 replies; 13+ messages in thread
From: Po Lu @ 2023-08-25  7:28 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> OK, but still, D-Bus is required to have notifications-notify work,
> right?

Not only is D-Bus required, so is a Unix system with a desktop
environment on the lines of GNOME.

> You can tell them that they don't want w32-notification-notify when
> D-Bus is available, since the latter is superior, AFAIU.

D-Bus doesn't supply desktop notifications, it's just a remote procedure
call system.  For desktop notifications to function, an X desktop
environment is also required, and those aren't available on MS Windows.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-25  7:28                 ` Po Lu
@ 2023-08-25 10:18                   ` Eli Zaretskii
  2023-08-25 11:44                     ` Po Lu
  2023-08-25 10:37                   ` Michael Albinus
  1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-08-25 10:18 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 25 Aug 2023 15:28:22 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > OK, but still, D-Bus is required to have notifications-notify work,
> > right?
> 
> Not only is D-Bus required, so is a Unix system with a desktop
> environment on the lines of GNOME.
> 
> > You can tell them that they don't want w32-notification-notify when
> > D-Bus is available, since the latter is superior, AFAIU.
> 
> D-Bus doesn't supply desktop notifications, it's just a remote procedure
> call system.  For desktop notifications to function, an X desktop
> environment is also required, and those aren't available on MS Windows.

So you are saying that notifications-notify will not work on
MS-Windows even if D-Bus is available?  in that case, if the conflicts
of symbols are resolved (but please verify that by actually building
such an Emacs), I'm okay with removing the D-Bus condition from the
cpp directive.  (But I still think this feature is not worth any
significant efforts to support it, and people who think it will give
them similar notifications to what users of Posix platforms have, they
will be very disappointed.)

Thanks.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-25  7:28                 ` Po Lu
  2023-08-25 10:18                   ` Eli Zaretskii
@ 2023-08-25 10:37                   ` Michael Albinus
  2023-08-25 11:43                     ` Po Lu
  1 sibling, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2023-08-25 10:37 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

Hi,

>> You can tell them that they don't want w32-notification-notify when
>> D-Bus is available, since the latter is superior, AFAIU.
>
> D-Bus doesn't supply desktop notifications, it's just a remote procedure
> call system.  For desktop notifications to function, an X desktop
> environment is also required, and those aren't available on MS Windows.

I don't believe that an X desktop is mandatory. All what's needed is a
D-Bus session service "org.freedesktop.Notifications" under MS-Windows.

How it is implemented doesn't matter. I don't know the D-Bus
implementations under MS-Windows, perhaps they are based on X
desktop. But this would be an implementation detail, and not an D-Bus
requirement.

JFTR.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-25 10:37                   ` Michael Albinus
@ 2023-08-25 11:43                     ` Po Lu
  0 siblings, 0 replies; 13+ messages in thread
From: Po Lu @ 2023-08-25 11:43 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Eli Zaretskii, emacs-devel

Michael Albinus <michael.albinus@gmx.de> writes:

> I don't believe that an X desktop is mandatory. All what's needed is a
> D-Bus session service "org.freedesktop.Notifications" under MS-Windows.

Yes, but the only implementations of such services I'm aware of are
furnished by X desktops.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: w32-notification-notify and HAVE_DBUS
  2023-08-25 10:18                   ` Eli Zaretskii
@ 2023-08-25 11:44                     ` Po Lu
  0 siblings, 0 replies; 13+ messages in thread
From: Po Lu @ 2023-08-25 11:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> So you are saying that notifications-notify will not work on
> MS-Windows even if D-Bus is available?  in that case, if the conflicts
> of symbols are resolved (but please verify that by actually building
> such an Emacs), I'm okay with removing the D-Bus condition from the
> cpp directive.  (But I still think this feature is not worth any
> significant efforts to support it, and people who think it will give
> them similar notifications to what users of Posix platforms have, they
> will be very disappointed.)
>
> Thanks.

I'll enlist someone to do this and ack.



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-25 11:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <878ra062ua.fsf.ref@yahoo.com>
2023-08-24 12:29 ` w32-notification-notify and HAVE_DBUS Po Lu
2023-08-24 12:50   ` Eli Zaretskii
2023-08-24 13:01     ` Po Lu
2023-08-24 14:38       ` Eli Zaretskii
2023-08-25  0:26         ` Po Lu
2023-08-25  5:35           ` Eli Zaretskii
2023-08-25  6:35             ` Po Lu
2023-08-25  7:17               ` Eli Zaretskii
2023-08-25  7:28                 ` Po Lu
2023-08-25 10:18                   ` Eli Zaretskii
2023-08-25 11:44                     ` Po Lu
2023-08-25 10:37                   ` Michael Albinus
2023-08-25 11:43                     ` Po Lu

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.