GNU bug report logs -
#80087
Improve system-taskbar for unsupported or unenabled back ends
Previous Next
To reply to this bug, email your comments to 80087 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Sun, 28 Dec 2025 16:21:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stéphane Marks <shipmints <at> gmail.com>:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org.
(Sun, 28 Dec 2025 16:21:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
+ Stefan who graciously assisted with this package at its inception.
I tested `system-taskbar-mode` on an unsupported back-end system and it
needed a couple of tweaks.
Patch incoming once a bug number is assigned.
-Stéphane
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Sun, 28 Dec 2025 16:28:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 80087 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Dec 28, 2025 at 11:21 AM Stéphane Marks <shipmints <at> gmail.com> wrote:
> + Stefan who graciously assisted with this package at its inception.
>
> I tested `system-taskbar-mode` on an unsupported back-end system and it
> needed a couple of tweaks.
>
> Patch incoming once a bug number is assigned.
>
Attached.
[Message part 2 (text/html, inline)]
[0001-Improve-system-taskbar-on-unsupported-or-unenabled-b.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Mon, 29 Dec 2025 19:10:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 80087 <at> debbugs.gnu.org (full text, mbox):
> @@ -155,6 +155,9 @@ system-taskbar-progress-reporter-remove
> (defvar system-taskbar--back-end nil
> "Generic taskbar method system dispatcher.")
>
> +(defvar system-taskbar--enabled nil
> + "Non-nil when `system-taskbar' is enabled.")
I don't think we need this var.
> ;;;###autoload
> (define-minor-mode system-taskbar-mode
> "System GUI taskbar icon badge, progress report, alerting."
> @@ -163,18 +166,27 @@ system-taskbar-mode
> (warn "Batch mode does not support `system-taskbar'"))
> (cond (system-taskbar-mode
> (if (system-taskbar--set-back-end)
> - (system-taskbar--enable)
> + (unless (setq system-taskbar--enabled
> + (system-taskbar--enable))
> + (warn "`system-taskbar' could not be initialized"))
I suggest
(unless (and (system-taskbar--set-back-end)
(system-taskbar--enable))
(setq system-taskbar-mode nil)
(warn "`system-taskbar' could not be initialized"))
instead.
> +(defun system-taskbar-enabled ()
> + "Return non-nil when `system-taskbar' is enabled."
> + (and system-taskbar-mode
> + system-taskbar--back-end
> + system-taskbar--enabled))
Just test `system-taskbar-mode` instead.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Mon, 29 Dec 2025 19:22:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 80087 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Dec 29, 2025 at 2:09 PM Stefan Monnier <monnier <at> iro.umontreal.ca>
wrote:
> > @@ -155,6 +155,9 @@ system-taskbar-progress-reporter-remove
> > (defvar system-taskbar--back-end nil
> > "Generic taskbar method system dispatcher.")
> >
> > +(defvar system-taskbar--enabled nil
> > + "Non-nil when `system-taskbar' is enabled.")
>
> I don't think we need this var.
>
> > ;;;###autoload
> > (define-minor-mode system-taskbar-mode
> > "System GUI taskbar icon badge, progress report, alerting."
> > @@ -163,18 +166,27 @@ system-taskbar-mode
> > (warn "Batch mode does not support `system-taskbar'"))
> > (cond (system-taskbar-mode
> > (if (system-taskbar--set-back-end)
> > - (system-taskbar--enable)
> > + (unless (setq system-taskbar--enabled
> > + (system-taskbar--enable))
> > + (warn "`system-taskbar' could not be initialized"))
>
> I suggest
>
> (unless (and (system-taskbar--set-back-end)
> (system-taskbar--enable))
> (setq system-taskbar-mode nil)
> (warn "`system-taskbar' could not be initialized"))
>
> instead.
>
> > +(defun system-taskbar-enabled ()
> > + "Return non-nil when `system-taskbar' is enabled."
> > + (and system-taskbar-mode
> > + system-taskbar--back-end
> > + system-taskbar--enabled))
>
> Just test `system-taskbar-mode` instead.
>
That's better but I wasn't sure that it was acceptable to alter the mode
variable in the "constructor." I tried to find other examples before I did
this and they weren't immediately obvious.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Mon, 29 Dec 2025 19:44:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 80087 <at> debbugs.gnu.org (full text, mbox):
> That's better but I wasn't sure that it was acceptable to alter the mode
> variable in the "constructor." I tried to find other examples before I did
> this and they weren't immediately obvious.
It's not done often, but yes it's "standard practice" to disable the mode
when it can't be enabled, like here.
sed -n -e '/(define-minor-mode/p'
-e '/(define-minor-mode/,/^(/{/(setq .*-mode nil)/p}' **/*.el
suggests it's used by `whitespace-mode`, `erc-mname-mode`,
`tildify-mode`, `shell-highlight-undef-mode`,
`horizontal-scroll-bar-mode`, `hs-minor-mode`, `hl-line-mode`,
`font-lock-mode`, `gnus-topic-mode`, ...
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Mon, 29 Dec 2025 19:47:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 80087 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Dec 29, 2025 at 2:43 PM Stefan Monnier <monnier <at> iro.umontreal.ca>
wrote:
> > That's better but I wasn't sure that it was acceptable to alter the mode
> > variable in the "constructor." I tried to find other examples before I
> did
> > this and they weren't immediately obvious.
>
> It's not done often, but yes it's "standard practice" to disable the mode
> when it can't be enabled, like here.
>
> sed -n -e '/(define-minor-mode/p'
> -e '/(define-minor-mode/,/^(/{/(setq .*-mode nil)/p}' **/*.el
>
> suggests it's used by `whitespace-mode`, `erc-mname-mode`,
> `tildify-mode`, `shell-highlight-undef-mode`,
> `horizontal-scroll-bar-mode`, `hs-minor-mode`, `hl-line-mode`,
> `font-lock-mode`, `gnus-topic-mode`, ...
>
Revised patch attached.
[Message part 2 (text/html, inline)]
[0001-Improve-system-taskbar-on-unsupported-or-unenabled-b.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Mon, 29 Dec 2025 21:14:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 80087 <at> debbugs.gnu.org (full text, mbox):
> @@ -162,9 +162,10 @@ system-taskbar-mode
> (when noninteractive
> (warn "Batch mode does not support `system-taskbar'"))
> (cond (system-taskbar-mode
> - (if (system-taskbar--set-back-end)
> - (system-taskbar--enable)
> - (warn "System does not support `system-taskbar'"))
> + (unless (and (system-taskbar--set-back-end)
> + (system-taskbar--enable))
> + (setq system-taskbar-mode nil)
> + (warn "`system-taskbar' could not be initialized"))
> (when system-taskbar-use-progress-reporter
> (system-taskbar-progress-reporter-install)))
> (t
Do we still want to `system-taskbar-progress-reporter-install` if the
initialization failed?
- Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Mon, 29 Dec 2025 21:17:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 80087 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Dec 29, 2025 at 4:13 PM Stefan Monnier <monnier <at> iro.umontreal.ca>
wrote:
> > @@ -162,9 +162,10 @@ system-taskbar-mode
> > (when noninteractive
> > (warn "Batch mode does not support `system-taskbar'"))
> > (cond (system-taskbar-mode
> > - (if (system-taskbar--set-back-end)
> > - (system-taskbar--enable)
> > - (warn "System does not support `system-taskbar'"))
> > + (unless (and (system-taskbar--set-back-end)
> > + (system-taskbar--enable))
> > + (setq system-taskbar-mode nil)
> > + (warn "`system-taskbar' could not be initialized"))
> > (when system-taskbar-use-progress-reporter
> > (system-taskbar-progress-reporter-install)))
> > (t
>
> Do we still want to `system-taskbar-progress-reporter-install` if the
> initialization failed?
>
I thought about moving it into the conditional but you didn't so I left
it. It's innocuous since the function does check the mode is active.
Happy to change it.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org:
bug#80087; Package
emacs.
(Mon, 29 Dec 2025 21:56:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 80087 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, Dec 29, 2025 at 4:15 PM Stéphane Marks <shipmints <at> gmail.com> wrote:
> On Mon, Dec 29, 2025 at 4:13 PM Stefan Monnier <monnier <at> iro.umontreal.ca>
> wrote:
>
>> > @@ -162,9 +162,10 @@ system-taskbar-mode
>> > (when noninteractive
>> > (warn "Batch mode does not support `system-taskbar'"))
>> > (cond (system-taskbar-mode
>> > - (if (system-taskbar--set-back-end)
>> > - (system-taskbar--enable)
>> > - (warn "System does not support `system-taskbar'"))
>> > + (unless (and (system-taskbar--set-back-end)
>> > + (system-taskbar--enable))
>> > + (setq system-taskbar-mode nil)
>> > + (warn "`system-taskbar' could not be initialized"))
>> > (when system-taskbar-use-progress-reporter
>> > (system-taskbar-progress-reporter-install)))
>> > (t
>>
>> Do we still want to `system-taskbar-progress-reporter-install` if the
>> initialization failed?
>>
>
> I thought about moving it into the conditional but you didn't so I left
> it. It's innocuous since the function does check the mode is active.
> Happy to change it.
>
Here it is the more correct way.
[Message part 2 (text/html, inline)]
[0001-Improve-system-taskbar-on-unsupported-or-unenabled-b.patch (application/octet-stream, attachment)]
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility.
(Mon, 29 Dec 2025 23:31:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Stéphane Marks <shipmints <at> gmail.com>:
bug acknowledged by developer.
(Mon, 29 Dec 2025 23:31:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 80087-done <at> debbugs.gnu.org (full text, mbox):
>>> Do we still want to `system-taskbar-progress-reporter-install` if the
>>> initialization failed?
>> I thought about moving it into the conditional but you didn't so I left
>> it. It's innocuous since the function does check the mode is active.
Ah, fair enough.
> Here it is the more correct way.
That works as well. Pushed to `master`, thanks,
- Stefan
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.