GNU bug report logs -
#48736
28.0.50; Regression in `enable-theme'
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Sun, 30 May 2021 03:08:02 UTC
Severity: normal
Tags: fixed
Found in version 28.0.50
Done: Mauro Aranda <maurooaranda <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48736 in the body.
You can then email your comments to 48736 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48736
; Package
emacs
.
(Sun, 30 May 2021 03:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Mendler <mail <at> daniel-mendler.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 30 May 2021 03:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On Emacs 27 the following snippet works as expected:
~~~
(defun set-theme (theme)
(mapc #'disable-theme custom-enabled-themes)
(when theme
(if (custom-theme-p theme)
(enable-theme theme)
(load-theme theme :no-confirm))))
(set-theme 'deeper-blue)
(set-theme 'leuven)
(set-theme 'deeper-blue)
~~~
On Emacs 28, the second call `(set-theme 'deeper-blue)` is ineffective
and `deeper-blue` is not enabled. In contrast, the `set-theme` function
works, if written as follows, indicating a regression in `enable-theme`.
~~~
(defun set-theme (theme)
(mapc #'disable-theme custom-enabled-themes)
(when theme
(load-theme theme :no-confirm)))
~~~
In GNU Emacs 28.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version
3.24.5, cairo version 1.16.0)
of 2021-05-23 built on projects
Repository revision: 04e7c6da34df6b60e253a35b9baa3eba4062617f
Repository branch: icomplete-affixate
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48736
; Package
emacs
.
(Sun, 30 May 2021 12:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 48736 <at> debbugs.gnu.org (full text, mbox):
Daniel Mendler <mail <at> daniel-mendler.de> writes:
> On Emacs 27 the following snippet works as expected:
>
> ~~~
> (defun set-theme (theme)
> (mapc #'disable-theme custom-enabled-themes)
> (when theme
> (if (custom-theme-p theme)
> (enable-theme theme)
> (load-theme theme :no-confirm))))
>
> (set-theme 'deeper-blue)
> (set-theme 'leuven)
> (set-theme 'deeper-blue)
> ~~~
>
> On Emacs 28, the second call `(set-theme 'deeper-blue)` is ineffective
> and `deeper-blue` is not enabled. In contrast, the `set-theme` function
> works, if written as follows, indicating a regression in `enable-theme`.
>
> ~~~
> (defun set-theme (theme)
> (mapc #'disable-theme custom-enabled-themes)
> (when theme
> (load-theme theme :no-confirm)))
> ~~~
>
Hello Daniel, thanks for the bug report.
The regression is not in enable-theme, but in disable-theme, since it is
resetting all theme settings via custom-push-theme. I thought I had
fixed it in a follow up commit to this one:
commit 527413fb2ff8c073d89ee2d22d38a67c74678b27
Author: Mauro Aranda <maurooaranda <at> gmail.com>
Date: Fri Nov 6 09:34:08 2020 -0300
Go back to not using custom-push-theme when enabling a theme
* lisp/custom.el (enable-theme): Relying on custom-push-theme to
handle theme settings and prior user settings was a mistake. The
theme settings haven't changed between loading the theme and enabling
it, so we don't need all of what custom-push-theme does. However, we
still need to save a user setting outside of Customize, in order to be
able to get back to it, so do that in enable-theme itself.
But it looks like I didn't. Anyway, it should be fixed on master,
please confirm.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48736
; Package
emacs
.
(Sun, 30 May 2021 13:03:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 48736 <at> debbugs.gnu.org (full text, mbox):
On 5/30/21 2:40 PM, Mauro Aranda wrote:
> But it looks like I didn't. Anyway, it should be fixed on master,
> please confirm.
Thank you for the quick fix! I confirm that it works.
Daniel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48736
; Package
emacs
.
(Sun, 30 May 2021 15:03:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 48736 <at> debbugs.gnu.org (full text, mbox):
tags 48736 fixed
close 48736
quit
Daniel Mendler <mail <at> daniel-mendler.de> writes:
> On 5/30/21 2:40 PM, Mauro Aranda wrote:
>> But it looks like I didn't. Anyway, it should be fixed on master,
>> please confirm.
>
> Thank you for the quick fix! I confirm that it works.
>
> Daniel
Thanks for confirming.
Added tag(s) fixed.
Request was from
Mauro Aranda <maurooaranda <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sun, 30 May 2021 15:03:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
48736 <at> debbugs.gnu.org and Daniel Mendler <mail <at> daniel-mendler.de>
Request was from
Mauro Aranda <maurooaranda <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sun, 30 May 2021 15:03:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 28 Jun 2021 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 274 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.