GNU bug report logs - #34027
27.0.50; disable-theme resets variables to their initial values

Previous Next

Package: emacs;

Reported by: Michael Albinus <michael.albinus <at> gmx.de>

Date: Thu, 10 Jan 2019 12:26:02 UTC

Severity: normal

Tags: fixed

Merged with 15687

Found in versions 24.3.50, 27.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 34027 in the body.
You can then email your comments to 34027 AT debbugs.gnu.org in the normal way.

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#34027; Package emacs. (Thu, 10 Jan 2019 12:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Albinus <michael.albinus <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 10 Jan 2019 12:26:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; disable-theme resets variables to their initial values
Date: Thu, 10 Jan 2019 13:25:17 +0100
Scenario:

- Declare a variable (either defvar or defcustom)
- Change the initial value to something else
- Enable a theme, which changes the value to something different, again
- Disable the theme

I would expect that the variable has been reset to the value prior
enabling the theme. But it is reset to the initial value.

The documentation of disable-theme isn't helpful, it just says "Disable
all variable and face settings defined by THEME."

I've added the test case custom--test-theme-variables in
test/lisp/custom-resources/custom--test-theme.el for showing the effect.


In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
 of 2018-12-27 built on detlef
Repository revision: 13dfe15ef4bc63ce66daffdc502a92aa9be44d92
Repository branch: master
System Description: Ubuntu 18.10

Recent messages:
Opening connection to imap.gmx.net...done
Opening connection to outlook.office365.com via tls...
Opening connection to outlook.office365.com...done
Reading active file via nnml...
Reading incoming mail from pop...
nnml: Reading incoming mail (no new mail)...done
Reading active file via nnml...done
Reading active file via nndraft...done
Checking new news...done
Auto-saving...done

Configured using:
 'configure --with-file-notification=gfile'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY GFILENOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT
LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LCMS2 GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8

Major mode: Group

Minor modes in effect:
  global-magit-file-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  diff-auto-refine-mode: t
  async-bytecomp-package-mode: t
  override-global-mode: t
  gnus-undo-mode: t
  erc-notify-mode: t
  erc-notifications-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  icomplete-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-editing-commands hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-editing-commands
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-repl hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-repl
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/inferior-slime hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/inferior-slime
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-tramp hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-tramp
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-scheme hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-scheme
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-media hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-media
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-presentation-streams hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-presentation-streams
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-trace-dialog hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-trace-dialog
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-autodoc hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-autodoc
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-scratch hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-scratch
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-fontifying-fu hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-fontifying-fu
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-listener-hooks hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-listener-hooks
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-enclosing-context hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-enclosing-context
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-asdf hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-asdf
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-indentation hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-indentation
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-sbcl-exts hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-sbcl-exts
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-macrostep hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-macrostep
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-hyperdoc hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-hyperdoc
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-cl-indent hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-cl-indent
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-fuzzy hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-fuzzy
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-mdot-fu hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-mdot-fu
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-references hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-references
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-fancy-inspector hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-fancy-inspector
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-fancy hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-fancy
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-parse hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-parse
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-fancy-trace hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-fancy-trace
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-c-p-c hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-c-p-c
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-quicklisp hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-quicklisp
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-compiler-notes-tree hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-compiler-notes-tree
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-clipboard hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-clipboard
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-highlight-edits hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-highlight-edits
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-presentations hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-presentations
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-banner hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-banner
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-xref-browser hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-xref-browser
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-mrepl hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-mrepl
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-snapshot hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-snapshot
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/bridge hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/bridge
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-sprof hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-sprof
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-typeout-frame hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-typeout-frame
/home/albinus/.emacs.d/elpa/slime-20190105.2006/contrib/slime-package-fu hides /home/albinus/.emacs.d/elpa/slime-20190105.2006/slime-package-fu
/home/albinus/src/elpa/packages/debbugs/debbugs-org hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-org
/home/albinus/src/elpa/packages/debbugs/debbugs-gnu hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-gnu
/home/albinus/src/elpa/packages/debbugs/debbugs hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs
/home/albinus/src/elpa/packages/debbugs/debbugs-autoloads hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-autoloads
/home/albinus/src/elpa/packages/debbugs/debbugs-pkg hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-pkg
/home/albinus/src/elpa/packages/debbugs/debbugs-browse hides /home/albinus/.emacs.d/elpa/debbugs-0.16/debbugs-browse
~/lisp/telepathy hides /home/albinus/.emacs.d/elpa/telepathy-20131209.1258/telepathy
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-pkg
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-smb
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-uu
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-adb
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-compat
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-archive
/home/albinus/src/tramp/lisp/tramp hides /usr/local/share/emacs/27.0.50/lisp/net/tramp
/home/albinus/src/tramp/lisp/trampver hides /usr/local/share/emacs/27.0.50/lisp/net/trampver
/home/albinus/src/tramp/lisp/tramp-rclone hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-loaddefs
~/lisp/dbus hides /usr/local/share/emacs/27.0.50/lisp/net/dbus
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-sh
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/27.0.50/lisp/net/tramp-cache

Features:
(shadow emacsbug eww mm-url mailalias nnir vc-hg ediff-vers xdg swiper
docker-volume docker-network docker-machine docker-image
docker-container docker-process docker-utils docker-group tablist
tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw cedet s ghub-graphql treepy
graphql ghub let-alist git-rebase ediff-merg ediff-wind ediff-diff
ediff-mult ediff-help ediff-init ediff-util ediff magit-bookmark
bookmark recentf magit-submodule magit-obsolete magit-blame magit-stash
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
magit-core magit-autorevert autorevert filenotify magit-process
magit-margin magit-mode git-commit magit-git magit-section magit-utils
magit-popup which-func vc-git diff-mode crm log-edit pcvs-util
with-editor async-bytecomp php-project mode-local imenu speedbar
sb-image ezimage dframe flymake-proc flymake add-log cc-langs cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs skeleton slime-repl-tests slime-indentation slime-tests
tree-widget ert ewoc debug backtrace inferior-slime slime-cl-indent
cl-indent slime-trace-dialog slime-fontifying-fu slime-package-fu
slime-references slime-compiler-notes-tree slime-scratch
slime-presentations bridge slime-macrostep macrostep slime-mdot-fu
slime-enclosing-context slime-fuzzy slime-fancy-trace
slime-fancy-inspector slime-c-p-c slime-autodoc slime-editing-commands
slime-repl elp slime-parse grep gud apropos cl slime arc-mode
archive-mode noutline outline hyperspec ivy use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
use-package-core warnings esh-var esh-cmd esh-opt esh-io esh-ext
esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util server
dired-aux async tempo ispell etags multifile generator xref project
find-func company-dabbrev company-template company delsel colir
ivy-overlay ffap color hydra lv easy-mmode pcase compile autoload
radix-tree lisp-mnt tar-mode misearch multi-isearch tmm time-stamp
url-http url-gw url-auth url-queue url-cache url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util shr
text-property-search svg dom browse-url flow-fill mm-archive qp gnus-dup
sort gnus-cite mail-extr gnus-bcklg gnus-async cl-extra help-mode
gnus-ml pop3 utf-7 nndraft nnmh nnml gnutls network-stream nsm
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-cache gnus-sum
nnnil smtpmail sendmail gnus-demon nntp gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int
gnus-range message rmc puny rfc822 mml mml-sec epa derived epg mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045
ietf-drums time-date mail-utils mm-util mail-prsvr wid-edit term/xterm
xterm elec-pair erc-notify erc-networks erc-desktop-notifications
erc-match notifications dbus xml erc-goodies erc erc-backend erc-compat
thingatpt pp erc-loaddefs cperl-mode time tramp-sh kubernetes-tramp
lxc-tramp lxd-tramp subr-x docker-tramp tramp-cache vagrant-tramp dash
term disp-table ehelp tramp tramp-loaddefs trampver tramp-compat
ucs-normalize shell pcomplete comint ansi-color ring parse-time
format-spec advice ido jka-compr icomplete paren vc vc-dispatcher dired
dired-loaddefs mule-util edmacro kmacro rx slime-autoloads info
finder-inf package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars seq byte-opt gv bytecomp byte-compile
cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
gfilenotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 1744851 334013)
 (symbols 48 68969 1)
 (strings 32 263536 29104)
 (string-bytes 1 8414120)
 (vectors 16 107386)
 (vector-slots 8 2266284 149460)
 (floats 8 633 1199)
 (intervals 56 174943 14326)
 (buffers 992 63))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34027; Package emacs. (Thu, 10 Jan 2019 16:35:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 34027 <at> debbugs.gnu.org
Subject: Re: bug#34027: 27.0.50;
 disable-theme resets variables to their initial values
Date: Thu, 10 Jan 2019 11:34:29 -0500
Duplicate of bug#15687?




Merged 15687 34027. Request was from Michael Albinus <michael.albinus <at> gmx.de> to control <at> debbugs.gnu.org. (Thu, 10 Jan 2019 18:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34027; Package emacs. (Thu, 10 Jan 2019 18:44:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 34027 <at> debbugs.gnu.org
Subject: Re: bug#34027: 27.0.50;
 disable-theme resets variables to their initial values
Date: Thu, 10 Jan 2019 19:43:29 +0100
Glenn Morris <rgm <at> gnu.org> writes:

Hi Glenn.

> Duplicate of bug#15687?

Yes. I'll merge both bugs, hopefully something will happen then.

(And maybe I'll become impatient, and try to solve it. My report was
triggered by the ELPA package tramp-theme.el, which suffers from this
problem.)

Best regards, Michael.




Removed tag(s) moreinfo. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 10 Jan 2019 18:51:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34027; Package emacs. (Fri, 03 Jan 2020 15:26:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 34027 <at> debbugs.gnu.org
Cc: michael.albinus <at> gmx.de
Subject: Re: bug#34027: 27.0.50; disable-theme resets variables to their
 initial values
Date: Fri, 3 Jan 2020 12:25:32 -0300
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> I've added the test case custom--test-theme-variables in
> test/lisp/custom-resources/custom--test-theme.el for showing the effect.

The test is failing for a different reason.  With the call to
custom-set-variables, both variables will end up having a user theme
setting, and since the user theme has the highest priority, enabling
the custom--test theme makes no difference.  The following check fails,
because of the user theme having the highest priority:

;; The variables have the theme values.
(should (equal custom--test-user-option 'bar))
(should (equal custom--test-variable 'bar))

IOW, the variables have the user theme values, and not the custom--test
theme values.

Best regards,
Mauro.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34027; Package emacs. (Fri, 04 Sep 2020 15:07:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 34027 <at> debbugs.gnu.org
Cc: Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#34027: 27.0.50; disable-theme resets variables to their
 initial values
Date: Fri, 4 Sep 2020 12:06:27 -0300
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Scenario:
>
> - Declare a variable (either defvar or defcustom)
> - Change the initial value to something else
> - Enable a theme, which changes the value to something different, again
> - Disable the theme
>
> I would expect that the variable has been reset to the value prior
> enabling the theme. But it is reset to the initial value.
>

There is code in custom-push-theme that attempts to handle this case,
but it was being skipped because custom didn't think it should apply the
settings of the theme (and at the same time, preserve priors
customizations).

That is controlled by the variable custom--inhibit-theme-enable, and
we should bind it to nil in enable-theme, because we are definitely
enabling it.  Once we do that, it is just a matter of using
custom-push-theme to handle the case like it's supposed to.

My patch does that, and introduces an extra check in custom-push-theme,
because while testing I found another instance of Bug#28904.  The rest
this patch does is changing the test because of the comments I made in
another post to this bug, and we now can expect the test to pass.
[Message part 2 (text/html, inline)]
[0001-Preserve-user-customizations-after-disabling-a-theme.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34027; Package emacs. (Sat, 05 Sep 2020 11:56:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Michael Albinus <michael.albinus <at> gmx.de>, 34027 <at> debbugs.gnu.org
Subject: Re: bug#34027: 27.0.50; disable-theme resets variables to their
 initial values
Date: Sat, 05 Sep 2020 13:55:03 +0200
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> That is controlled by the variable custom--inhibit-theme-enable, and
> we should bind it to nil in enable-theme, because we are definitely
> enabling it.  Once we do that, it is just a matter of using
> custom-push-theme to handle the case like it's supposed to.
>
> My patch does that, and introduces an extra check in custom-push-theme,
> because while testing I found another instance of Bug#28904.  The rest
> this patch does is changing the test because of the comments I made in
> another post to this bug, and we now can expect the test to pass.

Thanks, looks good to me (although I'm not all that familiar with the
custom/theme integration), so I've applied your patch to Emacs 28.

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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 05 Sep 2020 11:56:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 34027 <at> debbugs.gnu.org and Michael Albinus <michael.albinus <at> gmx.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 05 Sep 2020 11:56: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. (Sun, 04 Oct 2020 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 176 days ago.

Previous Next


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