GNU bug report logs - #77496
[PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon badge

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Thu, 3 Apr 2025 16:46:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 77496 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Thu, 03 Apr 2025 16:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ship Mints <shipmints <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 03 Apr 2025 16:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon badge
Date: Thu, 3 Apr 2025 12:45:13 -0400
[Message part 1 (text/plain, inline)]
This function allows one to visually differentiate multiple running Emacs
sessions by icon in the doc or application switcher using the icon badge.
For example set the badge to the Emacs version, or add "test" to indicate
an instance launched for testing.  It can also be used to indicate pending
items for MUAs or whatever someone wants.  This very simple feature has
been on my list for a while...

-Stephane
[Message part 2 (text/html, inline)]
[0001-Add-ns-app-badge-to-set-macOS-GNUstep-icon-badge.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Thu, 03 Apr 2025 17:18:01 GMT) Full text and rfc822 format available.

Message #8 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Thu, 3 Apr 2025 13:16:57 -0400
[Message part 1 (text/plain, inline)]
FYI, this is backward compatible to at least macOS 10.5 from 2007 so I
didn't wrap the function with a version check.  GNUstep has had support for
at least six years (the Emacs documentation says GNUstep is still "alpha"
anyway, right?).

On Thu, Apr 3, 2025 at 12:46 PM Ship Mints <shipmints <at> gmail.com> wrote:

> This function allows one to visually differentiate multiple running Emacs
> sessions by icon in the doc or application switcher using the icon badge.
> For example set the badge to the Emacs version, or add "test" to indicate
> an instance launched for testing.  It can also be used to indicate pending
> items for MUAs or whatever someone wants.  This very simple feature has
> been on my list for a while...
>
> -Stephane
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Thu, 03 Apr 2025 17:43:01 GMT) Full text and rfc822 format available.

Message #11 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Thu, 3 Apr 2025 13:42:03 -0400
[Message part 1 (text/plain, inline)]
On Thu, Apr 3, 2025 at 1:16 PM Ship Mints <shipmints <at> gmail.com> wrote:

> FYI, this is backward compatible to at least macOS 10.5 from 2007 so I
> didn't wrap the function with a version check.  GNUstep has had support for
> at least six years (the Emacs documentation says GNUstep is still "alpha"
> anyway, right?).
>
> On Thu, Apr 3, 2025 at 12:46 PM Ship Mints <shipmints <at> gmail.com> wrote:
>
>> This function allows one to visually differentiate multiple running Emacs
>> sessions by icon in the doc or application switcher using the icon badge.
>> For example set the badge to the Emacs version, or add "test" to indicate
>> an instance launched for testing.  It can also be used to indicate pending
>> items for MUAs or whatever someone wants.  This very simple feature has
>> been on my list for a while...
>>
>> -Stephane
>>
>
Sample screenshot:

[image: image.png]
[Message part 2 (text/html, inline)]
[image.png (image/png, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Fri, 04 Apr 2025 06:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Fri, 04 Apr 2025 09:13:16 +0300
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Thu, 3 Apr 2025 12:45:13 -0400
> 
> This function allows one to visually differentiate multiple running Emacs sessions by icon in the doc or
> application switcher using the icon badge.  For example set the badge to the Emacs version, or add "test" to
> indicate an instance launched for testing.  It can also be used to indicate pending items for MUAs or whatever
> someone wants.  This very simple feature has been on my list for a while...

Thanks, but we can't install this until there's a comparable
functionality in Emacs on free systems (GNU/Linux and others).  Would
you like to work on implementing something similar on X and/or PGTK
platforms?

If and when we do have something similar on other platforms, the
function you implemented should become an internal one, and a
platform-independent API should be introduced, whose name should be
something more descriptive and not specific to NS terminology.  Like
gui-add-icon-notification, perhaps?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Fri, 04 Apr 2025 06:41:01 GMT) Full text and rfc822 format available.

Message #17 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Fri, 04 Apr 2025 09:40:04 +0300
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Thu, 3 Apr 2025 13:16:57 -0400
> 
> FYI, this is backward compatible to at least macOS 10.5 from 2007 so I didn't wrap the function with a version
> check.  GNUstep has had support for at least six years (the Emacs documentation says GNUstep is still
> "alpha" anyway, right?).

If the code uses features that are only available since some OS
version, we should make sure that using that on older OS versions does
nothing, and especially doesn't do any harm, like crash Emacs.  If the
OS API itself ignores such calls in older OS versions, then the Emacs
code doesn't have to be wrapped with an OS test; otherwise, we must
have the OS version test to prevent adverse effects on older OS
versions.

Specifically, for this feature: do we still support versions of macOS
older than 10.5 in Emacs?  If we do, then the backward compatibility
provided by the OS is not enough for us.

P.S. All this doesn't change the fact that we can only install this
feature when it can be made available on free systems.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Fri, 04 Apr 2025 11:39:02 GMT) Full text and rfc822 format available.

Message #20 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Fri, 4 Apr 2025 07:37:57 -0400
[Message part 1 (text/plain, inline)]
On Fri, Apr 4, 2025 at 2:40 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Thu, 3 Apr 2025 13:16:57 -0400
> >
> > FYI, this is backward compatible to at least macOS 10.5 from 2007 so I
> didn't wrap the function with a version
> > check.  GNUstep has had support for at least six years (the Emacs
> documentation says GNUstep is still
> > "alpha" anyway, right?).
>
> If the code uses features that are only available since some OS
> version, we should make sure that using that on older OS versions does
> nothing, and especially doesn't do any harm, like crash Emacs.  If the
> OS API itself ignores such calls in older OS versions, then the Emacs
> code doesn't have to be wrapped with an OS test; otherwise, we must
> have the OS version test to prevent adverse effects on older OS
> versions.
>
> Specifically, for this feature: do we still support versions of macOS
> older than 10.5 in Emacs?  If we do, then the backward compatibility
> provided by the OS is not enough for us.
>
> P.S. All this doesn't change the fact that we can only install this
> feature when it can be made available on free systems.
>

This feature exists in GNUstep.  Is this not sufficiently free?

The file nextstep/INSTALL says: Mac OS X 10.6 or later GNUstep "Startup
0.23" or later which are adequate minimums to support this function.

If you think we really need complete parity with Linux desktop systems
beyond GNUstep, based on some research this morning, we may be able to leverage
dbus messages for desktops that support for "count" (numeric only, sheesh)
/ "count-visible".  This functionality appears not to be tied to the
running process as on macOS/GNUstep but to a "URL" like
"application://{appname}.desktop"
where I guess appname would be emacs or Emacs, I dunno yet how this really
works when there are more than one running copies of an app process.  I'll
experiment and see if I can tease this out.

If this seems easy and you're 100% adamant that GNUstep is insufficiently
free, I can try to craft a more generic API that supports numeric counts
for Linux desktop shells, and text labels for macOS/GNUstep.

Anyone reading this thread that has experience on Linux desktops that
support count/count-visible and you have a few minutes, contact me.

-Stephane
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Fri, 04 Apr 2025 11:45:02 GMT) Full text and rfc822 format available.

Message #23 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Fri, 04 Apr 2025 14:44:26 +0300
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Fri, 4 Apr 2025 07:37:57 -0400
> Cc: 77496 <at> debbugs.gnu.org
> 
>  P.S. All this doesn't change the fact that we can only install this
>  feature when it can be made available on free systems.
> 
> This feature exists in GNUstep.  Is this not sufficiently free?

I mean the underlying OS.

> If you think we really need complete parity with Linux desktop systems beyond GNUstep, based on some
> research this morning, we may be able to leverage dbus messages for desktops that support for "count"
> (numeric only, sheesh) / "count-visible".  This functionality appears not to be tied to the running process as on
> macOS/GNUstep but to a "URL" like "application://{appname}.desktop" where I guess appname would be
> emacs or Emacs, I dunno yet how this really works when there are more than one running copies of an app
> process.  I'll experiment and see if I can tease this out.
> 
> If this seems easy and you're 100% adamant that GNUstep is insufficiently free, I can try to craft a more
> generic API that supports numeric counts for Linux desktop shells, and text labels for macOS/GNUstep.

I'd be surprised if X and/or GTK don't have a comparable feature.  So
yes, I think we should have something similar on GNU/Linux.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Fri, 04 Apr 2025 15:55:01 GMT) Full text and rfc822 format available.

Message #26 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Fri, 4 Apr 2025 11:53:52 -0400
[Message part 1 (text/plain, inline)]
On Fri, Apr 4, 2025 at 7:44 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Fri, 4 Apr 2025 07:37:57 -0400
> > Cc: 77496 <at> debbugs.gnu.org
> >
> >  P.S. All this doesn't change the fact that we can only install this
> >  feature when it can be made available on free systems.
> >
> > This feature exists in GNUstep.  Is this not sufficiently free?
>
> I mean the underlying OS.
>

GNUstep on Linux would do.

> If you think we really need complete parity with Linux desktop systems
> beyond GNUstep, based on some
> > research this morning, we may be able to leverage dbus messages for
> desktops that support for "count"
> > (numeric only, sheesh) / "count-visible".  This functionality appears
> not to be tied to the running process as on
> > macOS/GNUstep but to a "URL" like "application://{appname}.desktop"
> where I guess appname would be
> > emacs or Emacs, I dunno yet how this really works when there are more
> than one running copies of an app
> > process.  I'll experiment and see if I can tease this out.
> >
> > If this seems easy and you're 100% adamant that GNUstep is
> insufficiently free, I can try to craft a more
> > generic API that supports numeric counts for Linux desktop shells, and
> text labels for macOS/GNUstep.
>
> I'd be surprised if X and/or GTK don't have a comparable feature.  So
> yes, I think we should have something similar on GNU/Linux.
>

Seems not.  Seems to be a feature of desktop shells.

Not getting any love from trying 'gdbus' to force an app badge.  I'm surely
just an ignorant boob with dbus.

For anyone interested in helping out, this is the hack I'm trying, which,
if it worked, we'd model in Emacs invoking dbus directly vs. via command
line.

Approach via
https://wiki.ubuntu.com/Unity/LauncherAPI#Low_level_DBus_API:_com.canonical.Unity.LauncherEntry

$ uname -a
Linux deb-12 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1
(2025-03-06) x86_64 GNU/Linux
$ emacs& # distro's Emacs 30.1 (updated this morning)
$ gdbus emit --session --object-path /com/canonical/unity/launcherentry/0
--signal com.canonical.Unity.LauncherEntry.Update
"application://emacs.desktop" "{'count-visible': <true>, 'count': <123>}"
# nothing happens or appears, and gdbus reports silence
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 12:38:02 GMT) Full text and rfc822 format available.

Message #29 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ship Mints <shipmints <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep
 icon badge
Date: Sat, 05 Apr 2025 20:36:58 +0800
Ship Mints <shipmints <at> gmail.com> writes:

> GNUstep on Linux would do.

I am very skeptical that these APIs are implemented in GNUstep to a
greater degree of completion than mere stubs for compatibility with
Cocoa programs.  Please send a screenshot or some other proof of an app
"icon badge" being displayed under GNUstep.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 12:46:02 GMT) Full text and rfc822 format available.

Message #32 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Sat, 5 Apr 2025 08:45:18 -0400
[Message part 1 (text/plain, inline)]
On Sat, Apr 5, 2025 at 8:37 AM Po Lu <luangruo <at> yahoo.com> wrote:

> Ship Mints <shipmints <at> gmail.com> writes:
>
> > GNUstep on Linux would do.
>
> I am very skeptical that these APIs are implemented in GNUstep to a
> greater degree of completion than mere stubs for compatibility with
> Cocoa programs.  Please send a screenshot or some other proof of an app
> "icon badge" being displayed under GNUstep.
>

No reason to be skeptical. The API is dead simple as is the implementation.

https://multixden.blogspot.com/2023/08/gnustep-now-has-badges.html
https://github.com/gnustep/libs-gui/blob/fcfc643e3cacdb7b455629951481ead986cdd182/Headers/AppKit/NSDockTile.h#L65
https://github.com/gnustep/libs-gui/blob/fcfc643e3cacdb7b455629951481ead986cdd182/Source/NSDockTile.m#L122
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 13:36:01 GMT) Full text and rfc822 format available.

Message #35 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ship Mints <shipmints <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep
 icon badge
Date: Sat, 05 Apr 2025 21:35:28 +0800
Ship Mints <shipmints <at> gmail.com> writes:

> No reason to be skeptical. The API is dead simple as is the implementation.
>
> https://multixden.blogspot.com/2023/08/gnustep-now-has-badges.html
> https://github.com/gnustep/libs-gui/blob/fcfc643e3cacdb7b455629951481ead986cdd182/Headers/AppKit/NSDockTile.h#L65
> https://github.com/gnustep/libs-gui/blob/fcfc643e3cacdb7b455629951481ead986cdd182/Source/NSDockTile.m#L122

That's good to hear.  None the less, GNUstep is too seldom used for
feature availability there to justify implementing the same features on
Mac OS, particularly when Emacs's GNUstep port is known to be unreliable
and short of other critical editing features such as Indic or Arabic
script shaping support.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 13:45:02 GMT) Full text and rfc822 format available.

Message #38 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Sat, 5 Apr 2025 09:44:31 -0400
[Message part 1 (text/plain, inline)]
On Sat, Apr 5, 2025 at 9:35 AM Po Lu <luangruo <at> yahoo.com> wrote:

> Ship Mints <shipmints <at> gmail.com> writes:
>
> > No reason to be skeptical. The API is dead simple as is the
> implementation.
> >
> > https://multixden.blogspot.com/2023/08/gnustep-now-has-badges.html
> >
> https://github.com/gnustep/libs-gui/blob/fcfc643e3cacdb7b455629951481ead986cdd182/Headers/AppKit/NSDockTile.h#L65
> >
> https://github.com/gnustep/libs-gui/blob/fcfc643e3cacdb7b455629951481ead986cdd182/Source/NSDockTile.m#L122
>
> That's good to hear.  None the less, GNUstep is too seldom used for
> feature availability there to justify implementing the same features on
> Mac OS, particularly when Emacs's GNUstep port is known to be unreliable
> and short of other critical editing features such as Indic or Arabic
> script shaping support.
>

Eli asked that the hurdle to be cleared was support of the same feature on
a free platform.  If that hurdle is based on platform popularity, what are
the precise metrics we should use to gauge such?  I'm aware of GNUstep
being actively used in military, aerospace, and industrial products.  Is
Haiku?  Or any other esoteric platforms that Emacs supports?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 13:59:02 GMT) Full text and rfc822 format available.

Message #41 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Ship Mints <shipmints <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep
 icon badge
Date: Sat, 05 Apr 2025 21:58:39 +0800
Ship Mints <shipmints <at> gmail.com> writes:

> Eli asked that the hurdle to be cleared was support of the same feature
> on a free platform.  If that hurdle is based on platform popularity, what
> are the precise metrics we should use to gauge such?  I'm aware of
> GNUstep being actively used in military, aerospace, and industrial
> products.  Is Haiku?  Or any other esoteric platforms that Emacs
> supports?

The criteria is whether it tends to afford users of Emacs on proprietary
systems an advantage over those of free systems.  There's no reason to
insist that everything should be reduced to figures--Emacs on GNUstep is
not a viable substitute for any other configuration, and hence everyone
and his dog can see that features it might support are not material,
when the only alternative is Mac OS.

Haiku is free software and, above all, it is not being invoked to
rationalize the introduction of features on a proprietary OS.  The
question at issue is a world removed from whether to support an OS at
all.  So I fail to perceive its relevance.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 14:08:01 GMT) Full text and rfc822 format available.

Message #44 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Sat, 5 Apr 2025 10:06:43 -0400
[Message part 1 (text/plain, inline)]
On Sat, Apr 5, 2025 at 9:58 AM Po Lu <luangruo <at> yahoo.com> wrote:

> Ship Mints <shipmints <at> gmail.com> writes:
>
> > Eli asked that the hurdle to be cleared was support of the same feature
> > on a free platform.  If that hurdle is based on platform popularity, what
> > are the precise metrics we should use to gauge such?  I'm aware of
> > GNUstep being actively used in military, aerospace, and industrial
> > products.  Is Haiku?  Or any other esoteric platforms that Emacs
> > supports?
>
> The criteria is whether it tends to afford users of Emacs on proprietary
> systems an advantage over those of free systems.  There's no reason to
> insist that everything should be reduced to figures--Emacs on GNUstep is
> not a viable substitute for any other configuration, and hence everyone
> and his dog can see that features it might support are not material,
> when the only alternative is Mac OS.
>
> Haiku is free software and, above all, it is not being invoked to
> rationalize the introduction of features on a proprietary OS.  The
> question at issue is a world removed from whether to support an OS at
> all.  So I fail to perceive its relevance.
>

Are you willing to assist in figuring out how to get app badges working on
Linux desktop shells?  You have a lot of experience and I'd appreciate the
help.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 15:35:02 GMT) Full text and rfc822 format available.

Message #47 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: luangruo <at> yahoo.com, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Sat, 05 Apr 2025 18:34:38 +0300
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sat, 5 Apr 2025 09:44:31 -0400
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
> 
>  That's good to hear.  None the less, GNUstep is too seldom used for
>  feature availability there to justify implementing the same features on
>  Mac OS, particularly when Emacs's GNUstep port is known to be unreliable
>  and short of other critical editing features such as Indic or Arabic
>  script shaping support.
> 
> Eli asked that the hurdle to be cleared was support of the same feature on a free platform.  If that hurdle is
> based on platform popularity, what are the precise metrics we should use to gauge such?  I'm aware of
> GNUstep being actively used in military, aerospace, and industrial products.  Is Haiku?  Or any other esoteric
> platforms that Emacs supports?

I said explicitly that this should be supported on X or GTK.  I don't
think GNUstep on Linux counts, sorry.  It's too niche a platform for
this purpose.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 15:44:01 GMT) Full text and rfc822 format available.

Message #50 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Sat, 5 Apr 2025 11:43:40 -0400
[Message part 1 (text/plain, inline)]
On Sat, Apr 5, 2025 at 11:34 AM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Sat, 5 Apr 2025 09:44:31 -0400
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
> >
> >  That's good to hear.  None the less, GNUstep is too seldom used for
> >  feature availability there to justify implementing the same features on
> >  Mac OS, particularly when Emacs's GNUstep port is known to be unreliable
> >  and short of other critical editing features such as Indic or Arabic
> >  script shaping support.
> >
> > Eli asked that the hurdle to be cleared was support of the same feature
> on a free platform.  If that hurdle is
> > based on platform popularity, what are the precise metrics we should use
> to gauge such?  I'm aware of
> > GNUstep being actively used in military, aerospace, and industrial
> products.  Is Haiku?  Or any other esoteric
> > platforms that Emacs supports?
>
> I said explicitly that this should be supported on X or GTK.  I don't
> think GNUstep on Linux counts, sorry.  It's too niche a platform for
> this purpose.
>

Fair enough.  I'll keep looking around for pointers and will see if I can
make the dbus shell count/count-visible method work.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Sat, 05 Apr 2025 16:11:01 GMT) Full text and rfc822 format available.

Message #53 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ship Mints <shipmints <at> gmail.com>
Cc: luangruo <at> yahoo.com, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Sat, 05 Apr 2025 19:10:08 +0300
> From: Ship Mints <shipmints <at> gmail.com>
> Date: Sat, 5 Apr 2025 11:43:40 -0400
> Cc: luangruo <at> yahoo.com, 77496 <at> debbugs.gnu.org
> 
>  I said explicitly that this should be supported on X or GTK.  I don't
>  think GNUstep on Linux counts, sorry.  It's too niche a platform for
>  this purpose.
> 
> Fair enough.  I'll keep looking around for pointers and will see if I can make the dbus shell count/count-visible
> method work.

Thank you.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Tue, 08 Apr 2025 21:51:02 GMT) Full text and rfc822 format available.

Message #56 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Björn Bidar <bjorn.bidar <at> thaodan.de>
To: Ship Mints <shipmints <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep
 icon badge
Date: Wed, 09 Apr 2025 00:50:26 +0300
Ship Mints <shipmints <at> gmail.com> writes:

> On Fri, Apr 4, 2025 at 7:44 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > From: Ship Mints <shipmints <at> gmail.com>
>> > Date: Fri, 4 Apr 2025 07:37:57 -0400
>> > Cc: 77496 <at> debbugs.gnu.org
>> >
>> >  P.S. All this doesn't change the fact that we can only install this
>> >  feature when it can be made available on free systems.
>> >
>> > This feature exists in GNUstep.  Is this not sufficiently free?
>>
>> I mean the underlying OS.
>>
>
> GNUstep on Linux would do.
>
>> If you think we really need complete parity with Linux desktop systems
>> beyond GNUstep, based on some
>> > research this morning, we may be able to leverage dbus messages for
>> desktops that support for "count"
>> > (numeric only, sheesh) / "count-visible".  This functionality appears
>> not to be tied to the running process as on
>> > macOS/GNUstep but to a "URL" like "application://{appname}.desktop"
>> where I guess appname would be
>> > emacs or Emacs, I dunno yet how this really works when there are more
>> than one running copies of an app
>> > process.  I'll experiment and see if I can tease this out.
>> >
>> > If this seems easy and you're 100% adamant that GNUstep is
>> insufficiently free, I can try to craft a more
>> > generic API that supports numeric counts for Linux desktop shells, and
>> text labels for macOS/GNUstep.
>>
>> I'd be surprised if X and/or GTK don't have a comparable feature.  So
>> yes, I think we should have something similar on GNU/Linux.
>>
>
> Seems not.  Seems to be a feature of desktop shells.
>
> Not getting any love from trying 'gdbus' to force an app badge.  I'm surely
> just an ignorant boob with dbus.
>
> For anyone interested in helping out, this is the hack I'm trying, which,
> if it worked, we'd model in Emacs invoking dbus directly vs. via command
> line.
>

Which desktop environment do you use? It seems that at least KDE Plasma
and Unity support this API. I assume that also applies to GNOME Shell at
least under Ubuntu.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Wed, 09 Apr 2025 13:54:02 GMT) Full text and rfc822 format available.

Message #59 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Ship Mints <shipmints <at> gmail.com>
To: Björn Bidar <bjorn.bidar <at> thaodan.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep icon
 badge
Date: Wed, 9 Apr 2025 09:53:17 -0400
[Message part 1 (text/plain, inline)]
On Tue, Apr 8, 2025 at 5:51 PM Björn Bidar via Bug reports for GNU Emacs,
the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:

> Ship Mints <shipmints <at> gmail.com> writes:
>
> > On Fri, Apr 4, 2025 at 7:44 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> >> > From: Ship Mints <shipmints <at> gmail.com>
> >> > Date: Fri, 4 Apr 2025 07:37:57 -0400
> >> > Cc: 77496 <at> debbugs.gnu.org
> >> >
> >> >  P.S. All this doesn't change the fact that we can only install this
> >> >  feature when it can be made available on free systems.
> >> >
> >> > This feature exists in GNUstep.  Is this not sufficiently free?
> >>
> >> I mean the underlying OS.
> >>
> >
> > GNUstep on Linux would do.
> >
> >> If you think we really need complete parity with Linux desktop systems
> >> beyond GNUstep, based on some
> >> > research this morning, we may be able to leverage dbus messages for
> >> desktops that support for "count"
> >> > (numeric only, sheesh) / "count-visible".  This functionality appears
> >> not to be tied to the running process as on
> >> > macOS/GNUstep but to a "URL" like "application://{appname}.desktop"
> >> where I guess appname would be
> >> > emacs or Emacs, I dunno yet how this really works when there are more
> >> than one running copies of an app
> >> > process.  I'll experiment and see if I can tease this out.
> >> >
> >> > If this seems easy and you're 100% adamant that GNUstep is
> >> insufficiently free, I can try to craft a more
> >> > generic API that supports numeric counts for Linux desktop shells, and
> >> text labels for macOS/GNUstep.
> >>
> >> I'd be surprised if X and/or GTK don't have a comparable feature.  So
> >> yes, I think we should have something similar on GNU/Linux.
> >>
> >
> > Seems not.  Seems to be a feature of desktop shells.
> >
> > Not getting any love from trying 'gdbus' to force an app badge.  I'm
> surely
> > just an ignorant boob with dbus.
> >
> > For anyone interested in helping out, this is the hack I'm trying, which,
> > if it worked, we'd model in Emacs invoking dbus directly vs. via command
> > line.
> >
>
> Which desktop environment do you use? It seems that at least KDE Plasma
> and Unity support this API. I assume that also applies to GNOME Shell at
> least under Ubuntu.
>

I've been experimenting with Ubuntu.  The app icon badge protocol is
implemented in the gnome-shell dock extension (this is a brittle
methodology in several ways but that's what we have to work with).  I have
been unable to make it work, however.  It seems that despite the gjs dock
code appearing to contain the dbus subscriptions, d-spy doesn't show the
endpoint and dbus command-line tools also suggest the subscription isn't
working.  I ain't no dbus expert and this has been a tad frustrating, to
say the least.  That there is no "BDFL" in the Linux desktop ecosystem
definitely shows.

Does your gnome-shell dock properly react to
com.canonical.Unity.LauncherEntry.Update signals?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77496; Package emacs. (Wed, 23 Apr 2025 16:55:02 GMT) Full text and rfc822 format available.

Message #62 received at 77496 <at> debbugs.gnu.org (full text, mbox):

From: Björn Bidar <bjorn.bidar <at> thaodan.de>
To: Ship Mints <shipmints <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 77496 <at> debbugs.gnu.org
Subject: Re: bug#77496: [PATCH] Add 'ns-app-badge' to set macOS / GNUstep
 icon badge
Date: Wed, 23 Apr 2025 19:53:59 +0300
Sorry forgot to reply to the mail.

Ship Mints <shipmints <at> gmail.com> writes:

> On Tue, Apr 8, 2025 at 5:51 PM Björn Bidar via Bug reports for GNU Emacs,
> the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>
>> Ship Mints <shipmints <at> gmail.com> writes:
>>
>> > On Fri, Apr 4, 2025 at 7:44 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>> >
>> >> > From: Ship Mints <shipmints <at> gmail.com>
>> >> > Date: Fri, 4 Apr 2025 07:37:57 -0400
>> >> > Cc: 77496 <at> debbugs.gnu.org
>> >> >
>> >> >  P.S. All this doesn't change the fact that we can only install this
>> >> >  feature when it can be made available on free systems.
>> >> >
>> >> > This feature exists in GNUstep.  Is this not sufficiently free?
>> >>
>> >> I mean the underlying OS.
>> >>
>> >
>> > GNUstep on Linux would do.
>> >
>> >> If you think we really need complete parity with Linux desktop systems
>> >> beyond GNUstep, based on some
>> >> > research this morning, we may be able to leverage dbus messages for
>> >> desktops that support for "count"
>> >> > (numeric only, sheesh) / "count-visible".  This functionality appears
>> >> not to be tied to the running process as on
>> >> > macOS/GNUstep but to a "URL" like "application://{appname}.desktop"
>> >> where I guess appname would be
>> >> > emacs or Emacs, I dunno yet how this really works when there are more
>> >> than one running copies of an app
>> >> > process.  I'll experiment and see if I can tease this out.
>> >> >
>> >> > If this seems easy and you're 100% adamant that GNUstep is
>> >> insufficiently free, I can try to craft a more
>> >> > generic API that supports numeric counts for Linux desktop shells, and
>> >> text labels for macOS/GNUstep.
>> >>
>> >> I'd be surprised if X and/or GTK don't have a comparable feature.  So
>> >> yes, I think we should have something similar on GNU/Linux.
>> >>
>> >
>> > Seems not.  Seems to be a feature of desktop shells.
>> >
>> > Not getting any love from trying 'gdbus' to force an app badge.  I'm
>> surely
>> > just an ignorant boob with dbus.
>> >
>> > For anyone interested in helping out, this is the hack I'm trying, which,
>> > if it worked, we'd model in Emacs invoking dbus directly vs. via command
>> > line.
>> >
>>
>> Which desktop environment do you use? It seems that at least KDE Plasma
>> and Unity support this API. I assume that also applies to GNOME Shell at
>> least under Ubuntu.
>>
>
> I've been experimenting with Ubuntu.  The app icon badge protocol is
> implemented in the gnome-shell dock extension (this is a brittle
> methodology in several ways but that's what we have to work with).  I have
> been unable to make it work, however.  It seems that despite the gjs dock
> code appearing to contain the dbus subscriptions, d-spy doesn't show the
> endpoint and dbus command-line tools also suggest the subscription isn't
> working.  I ain't no dbus expert and this has been a tad frustrating, to
> say the least.  That there is no "BDFL" in the Linux desktop ecosystem
> definitely shows.

For desktop Linux there is Freedesktop.org which is largely still the
established platform to coordinate standards and share some
implementation of standards. However some actors such as GNOME have
become difficult to interact with or ignore some standards. The cost of
that being to improve their platform instead of "Linux", I don't write
GNU/Linux since desktop Linux isn't just GNU but
GNU/Freedesktop/GNOME/Qt/KDE/Linux etc the name would get quite long.

> Does your gnome-shell dock properly react to
> com.canonical.Unity.LauncherEntry.Update signals?

I'm nott using Gnome-Shell but KDE Plasma. For Plasma it works out of
the box once you have the task widget in your panel.

The easiest example for me to test this is a messaging app such as Telegram.
Just have widget add, start Telegram, have unread messages and look.
There are no need to open the options to toggle for you to enable it.
But you can configure the support for those in System-Settings ->
Notifications -> Additional Feedback.

Because usually I don't use a taskbar but a tilling window manager no
taskbar needed, some quick internet searches revealved some information
that might help to understand this.

This post is about KDE Plasma and Qt but the explanation does apply to
any implementation of the support for badges using that protocol:
https://reionwong.github.io/posts/kde/kde-badge/

The official Canonical documentation:
https://wiki.ubuntu.com/Unity/LauncherAPI

This gnome shell extension seems to support the launcher API:
https://github.com/micheleg/dash-to-dock (not-tested)
It's the same extension Ubuntu installs to provide a similar UX as in
Unity 7.
Check this bug for more:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-ubuntu-dock/+bug/1713712




This bug report was last modified 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.