unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Defaulting DBus support on macOS to 'off'?
@ 2022-03-14  9:35 Robert Pluim
  2022-03-14 10:21 ` Po Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2022-03-14  9:35 UTC (permalink / raw)
  To: emacs-devel

Hi,

DBus support is currently autodetected, which means it can get enabled
on a macOS --with-ns build, where itʼs basically useless. Would there
be any objection to defaulting it to 'off' on macOS (what about
GNUStep?)

Thanks

Robert
-- 



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14  9:35 Defaulting DBus support on macOS to 'off'? Robert Pluim
@ 2022-03-14 10:21 ` Po Lu
  2022-03-14 11:11   ` Robert Pluim
  2022-03-14 13:24   ` Eli Zaretskii
  0 siblings, 2 replies; 10+ messages in thread
From: Po Lu @ 2022-03-14 10:21 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

Robert Pluim <rpluim@gmail.com> writes:

> Hi,
>
> DBus support is currently autodetected, which means it can get enabled
> on a macOS --with-ns build, where itʼs basically useless. Would there
> be any objection to defaulting it to 'off' on macOS 

Yes.  It can't possibly hurt to have D-Bus enabled for people who have
the development files installed, especially since it can work on macOS.

> (what about GNUStep?)

GNUstep primarily runs on GNU/Linux systems, where the D-Bus support
will always be useful.

Thanks.



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14 10:21 ` Po Lu
@ 2022-03-14 11:11   ` Robert Pluim
  2022-03-14 11:18     ` Po Lu
  2022-03-14 13:24   ` Eli Zaretskii
  1 sibling, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2022-03-14 11:11 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

>>>>> On Mon, 14 Mar 2022 18:21:25 +0800, Po Lu <luangruo@yahoo.com> said:

    Po> Robert Pluim <rpluim@gmail.com> writes:
    >> Hi,
    >> 
    >> DBus support is currently autodetected, which means it can get enabled
    >> on a macOS --with-ns build, where itʼs basically useless. Would there
    >> be any objection to defaulting it to 'off' on macOS 

    Po> Yes.  It can't possibly hurt to have D-Bus enabled for people who have
    Po> the development files installed, especially since it can work on macOS.

It gives an annoying message on startup though. And Iʼm never going to
do whatever needs to be done to get it to work.

    >> (what about GNUStep?)

    Po> GNUstep primarily runs on GNU/Linux systems, where the D-Bus support
    Po> will always be useful.

OK

Robert
-- 



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14 11:11   ` Robert Pluim
@ 2022-03-14 11:18     ` Po Lu
  0 siblings, 0 replies; 10+ messages in thread
From: Po Lu @ 2022-03-14 11:18 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

Robert Pluim <rpluim@gmail.com> writes:

> It gives an annoying message on startup though. And Iʼm never going to
> do whatever needs to be done to get it to work.

What message is that?  Probably a bug which needs to be fixed.



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14 10:21 ` Po Lu
  2022-03-14 11:11   ` Robert Pluim
@ 2022-03-14 13:24   ` Eli Zaretskii
  2022-03-14 13:30     ` Po Lu
  2022-03-14 13:39     ` Robert Pluim
  1 sibling, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2022-03-14 13:24 UTC (permalink / raw)
  To: Po Lu; +Cc: rpluim, emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Mon, 14 Mar 2022 18:21:25 +0800
> 
> Robert Pluim <rpluim@gmail.com> writes:
> 
> > Hi,
> >
> > DBus support is currently autodetected, which means it can get enabled
> > on a macOS --with-ns build, where itʼs basically useless. Would there
> > be any objection to defaulting it to 'off' on macOS 
> 
> Yes.  It can't possibly hurt to have D-Bus enabled for people who have
> the development files installed, especially since it can work on macOS.

Robert didn't suggest to delete the DBus support on macOS, he
suggested to default it to OFF.

If having it default to ON annoys many users, I think it's a
reasonable suggestion.



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14 13:24   ` Eli Zaretskii
@ 2022-03-14 13:30     ` Po Lu
  2022-03-14 13:40       ` Lars Ingebrigtsen
  2022-03-14 13:39     ` Robert Pluim
  1 sibling, 1 reply; 10+ messages in thread
From: Po Lu @ 2022-03-14 13:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: rpluim, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Robert didn't suggest to delete the DBus support on macOS, he
> suggested to default it to OFF.
>
> If having it default to ON annoys many users, I think it's a
> reasonable suggestion.

If having it on annoys users, then that's a bug, because there are many
legitimate reasons for there being no message bus, including on
GNU/Linux systems.

So instead of disabling it by default on systems which are likely to not
have a running message bus, it should be fixed to not annoy users in
that situation.

Thanks.



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14 13:24   ` Eli Zaretskii
  2022-03-14 13:30     ` Po Lu
@ 2022-03-14 13:39     ` Robert Pluim
  2022-03-14 13:53       ` Po Lu
  1 sibling, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2022-03-14 13:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, emacs-devel

>>>>> On Mon, 14 Mar 2022 15:24:56 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Po Lu <luangruo@yahoo.com>
    >> Cc: emacs-devel@gnu.org
    >> Date: Mon, 14 Mar 2022 18:21:25 +0800
    >> 
    >> Robert Pluim <rpluim@gmail.com> writes:
    >> 
    >> > Hi,
    >> >
    >> > DBus support is currently autodetected, which means it can get enabled
    >> > on a macOS --with-ns build, where itʼs basically useless. Would there
    >> > be any objection to defaulting it to 'off' on macOS 
    >> 
    >> Yes.  It can't possibly hurt to have D-Bus enabled for people who have
    >> the development files installed, especially since it can work on macOS.

    Eli> Robert didn't suggest to delete the DBus support on macOS, he
    Eli> suggested to default it to OFF.

Exactly. We can discuss if that should be 'off in configure', or
'built if found, but off in Emacs' (Iʼd prefer the former).

    Eli> If having it default to ON annoys many users, I think it's a
    Eli> reasonable suggestion.

I dislike programs that log messages to my terminal when thereʼs
nothing really wrong:

$ src/emacs
dbus[2171]: Dynamic session lookup supported but failed: launchd did
not provide a socket path, verify that
org.freedesktop.dbus-session.plist is loaded!

although to be fair I think this message comes from libdbus, not from
Emacs.

Robert
-- 



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14 13:30     ` Po Lu
@ 2022-03-14 13:40       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-14 13:40 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, rpluim, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> So instead of disabling it by default on systems which are likely to not
> have a running message bus, it should be fixed to not annoy users in
> that situation.

Yup.  I think the same problem is still present on GNU/Linux -- if using
an Emacs built with DBus support on a machine without it, you'll get an
annoying warning on startup?  Or has that been fixed now? 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14 13:39     ` Robert Pluim
@ 2022-03-14 13:53       ` Po Lu
  2022-03-14 14:30         ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Po Lu @ 2022-03-14 13:53 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Eli Zaretskii, emacs-devel

Robert Pluim <rpluim@gmail.com> writes:

> Exactly. We can discuss if that should be 'off in configure', or
> 'built if found, but off in Emacs' (Iʼd prefer the former).

Then it should be made conditional on macOS, and not just NS being
enabled.  Emacs can also be built on that platform with X11 support, or
no toolkit at all.

> I dislike programs that log messages to my terminal when thereʼs
> nothing really wrong:
>
> $ src/emacs
> dbus[2171]: Dynamic session lookup supported but failed: launchd did
> not provide a socket path, verify that
> org.freedesktop.dbus-session.plist is loaded!
>
> although to be fair I think this message comes from libdbus, not from
> Emacs.

I will see if I can stop that message from showing up, thanks.



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

* Re: Defaulting DBus support on macOS to 'off'?
  2022-03-14 13:53       ` Po Lu
@ 2022-03-14 14:30         ` Robert Pluim
  0 siblings, 0 replies; 10+ messages in thread
From: Robert Pluim @ 2022-03-14 14:30 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, emacs-devel

>>>>> On Mon, 14 Mar 2022 21:53:37 +0800, Po Lu <luangruo@yahoo.com> said:

    Po> Robert Pluim <rpluim@gmail.com> writes:
    >> Exactly. We can discuss if that should be 'off in configure', or
    >> 'built if found, but off in Emacs' (Iʼd prefer the former).

    Po> Then it should be made conditional on macOS, and not just NS being
    Po> enabled.  Emacs can also be built on that platform with X11 support, or
    Po> no toolkit at all.

That was my plan all along:

diff --git a/configure.ac b/configure.ac
index a315eeb6bd..4be5a9c767 100644
--- a/configure.ac
+++ b/configure.ac
@@ -474,7 +474,9 @@ AC_DEFUN
 OPTION_DEFAULT_OFF([pgtk], [use GTK to support window systems other than X])
 
 OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console])
-OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
+AC_ARG_WITH([dbus],[AS_HELP_STRING([--with-dbus],
+[compile with D-Bus support.
+Off by default on macOS.])],[],[with_dbus=maybe])
 AC_ARG_WITH([gconf],[AS_HELP_STRING([--with-gconf],
 [compile with Gconf support (Gsettings replaces this)])],[],
 [if test $with_features = yes; then
@@ -2930,6 +2932,15 @@ AC_DEFUN
 dnl other platforms.
 HAVE_DBUS=no
 DBUS_OBJ=
+
+# Only use dbus on macOS if it's explicitly requested
+if test "${with_dbus}" = maybe; then
+   if test "${opsys}" = darwin; then
+      with_dbus=no
+   else
+      with_dbus=yes
+   fi
+fi
 if test "${with_dbus}" = "yes"; then
    EMACS_CHECK_MODULES([DBUS], [dbus-1 >= 1.0])
    if test "$HAVE_DBUS" = yes; then

    Po> I will see if I can stop that message from showing up, thanks.

That would be a good first step.

Robert
-- 



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

end of thread, other threads:[~2022-03-14 14:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-14  9:35 Defaulting DBus support on macOS to 'off'? Robert Pluim
2022-03-14 10:21 ` Po Lu
2022-03-14 11:11   ` Robert Pluim
2022-03-14 11:18     ` Po Lu
2022-03-14 13:24   ` Eli Zaretskii
2022-03-14 13:30     ` Po Lu
2022-03-14 13:40       ` Lars Ingebrigtsen
2022-03-14 13:39     ` Robert Pluim
2022-03-14 13:53       ` Po Lu
2022-03-14 14:30         ` Robert Pluim

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).