From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#20766: 24.5; disable-theme leaves lingering effects Date: Fri, 6 Nov 2020 09:26:36 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009899f905b36f5309" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13660"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 20766@debbugs.gnu.org To: Anders Papitto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 06 13:27:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kb0pi-0003Qa-ML for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 13:27:10 +0100 Original-Received: from localhost ([::1]:53558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kb0ph-0005TJ-Nv for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 07:27:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kb0pa-0005T7-K9 for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 07:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43766) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kb0pa-0004Hb-AQ for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 07:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kb0pa-0008W2-6w for bug-gnu-emacs@gnu.org; Fri, 06 Nov 2020 07:27:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Nov 2020 12:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20766 X-GNU-PR-Package: emacs Original-Received: via spool by 20766-submit@debbugs.gnu.org id=B20766.160466561732723 (code B ref 20766); Fri, 06 Nov 2020 12:27:02 +0000 Original-Received: (at 20766) by debbugs.gnu.org; 6 Nov 2020 12:26:57 +0000 Original-Received: from localhost ([127.0.0.1]:55312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kb0pU-0008Vj-KH for submit@debbugs.gnu.org; Fri, 06 Nov 2020 07:26:56 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:33302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kb0pS-0008VU-Mn for 20766@debbugs.gnu.org; Fri, 06 Nov 2020 07:26:55 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id b8so1150989wrn.0 for <20766@debbugs.gnu.org>; Fri, 06 Nov 2020 04:26:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=JC1/v+PjP9IDBb+/TMtoHYzSv8KLV9RLdvM1P62IY1Q=; b=rE9mVRODfW/QpCnsL/UxJfIW+qIfrOM51HOewsgqzwVdT5+F8v82lpSxCwSRx1hrUO 910tpssNjNbpiWP8/8ZeuZmwPOaaKompCjeuXuloVingxN61oeSEni350m/rCHdHKXai 1GROkHfMflCMsNr/5lQfeLzsmAf9UAa/Lh1w0y/MCo4hQ0ZUyPLXQkY3u4hPAzDCrod1 0Ud19VymiLpqZzdQwYfpnZo52Uf2OZ5uQW5OruBwFkkgTXk/8ZrYLJmE3/0Tg/RAxSwr ReML2n/C9sPUW/EOgKS7o+Npgp0LB4dvQcVKnCGbNkwlJl+Lv7TbaCe0/F5mrGEmhUya Vprg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=JC1/v+PjP9IDBb+/TMtoHYzSv8KLV9RLdvM1P62IY1Q=; b=BSeN6uQZ4v90J9tK5zEID5Mwaljn2+7iel5WWafAZK6w26xjZcf6OIHxcPsKb+wdme K9A370/kxavCBX1DCsGp4ibzluYczcBF1YQQx5NfiJZmi/KX3DQTEJSVCZKJT9j12+Zo PdF0rvsKj8moirp6wQKmGD4QmY2oC1Vbmr7DmlWcMLn9iyrMne02lBJgCkmbwxpm7Knc v4EKQlQPjx+Xek8I7YB16QXvLpL7ECnxXTX8htBywo6+6jUrjwJY0TYkSZ0D/3M1kkVY vzFvZ2v6pADjm7JMyUuaZuDgE4Qg7AW4+0cTUqY7tVqgmWDeBXqnibnpnN3yFS4U7Ncp 3zdQ== X-Gm-Message-State: AOAM531bAWgG3/nhHIhYT6yJ3vwNCvk5Fs1kw5GbVr2l/uXfqBoy9Ele rtqyCUTHCfRWdDdpHSoBq4Xr/FFbMx+4Z9B/Ofk= X-Google-Smtp-Source: ABdhPJylHLXKzbW3Bi6HZ13kQo1PKl9PPkm0Pmm88J/fCsAUf6UF/NU5DK5XL4aImykMkrLKt+ZweTDZTbOqwa9R3Zs= X-Received: by 2002:a5d:69d1:: with SMTP id s17mr2537937wrw.77.1604665608803; Fri, 06 Nov 2020 04:26:48 -0800 (PST) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192772 Archived-At: --0000000000009899f905b36f5309 Content-Type: text/plain; charset="UTF-8" Anders Papitto writes: > When I run these commands from a fresh Emacs instance > > M-x load-theme RET solarized-light RET > M-x disable-theme RET solarized-light RET > M-x term RET RET > > the text background color in term-mode stays what it was set to by the > solarized-light theme. A very similar invocation does not have this > behavior: > > M-x term RET RET > C-c k RET yes RET > M-x load-theme RET solarized-light RET > M-x disable-theme RET solarized-light RET > M-x term RET RET > > i.e. If term mode gets to run before loading the theme, no bug. > This bug is still present. It looks like solarized still sets the obsoleted variables term-default-fg-color and term-default-bg-color, but still, the bug is in custom.el and it's related to Bug#21355. Here's a recipe: Save this theme into test-bug20766-theme.el, and arrange to load it. (deftheme test-bug20766) (custom-theme-set-variables 'test-bug20766 '(test-option 'foo)) (provide-theme 'test-bug20766) emacs -Q M-x load-theme RET test-bug20766 test-option is not yet known, so custom stores the theme setting under the saved-value property of test-option. M-x disable-theme RET test-bug20766 The saved-value property should be nil, because the theme setting is no longer relevant. However, it's still ('foo). Then eval the following defcustom: (defcustom test-option 'bar "..." :type 'symbol :group 'emacs) M-: test-option ==> foo, which is wrong. In the original recipe, that is how term-default-fg-color and term-default-bg-color get the solarized theme setting after loading term. --0000000000009899f905b36f5309 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Anders Papitto <anderspapitto@gmail.com> writes:

> When I run these co= mmands from a fresh Emacs instance
>
> M-x load-theme RET solar= ized-light RET
> M-x disable-theme RET solarized-light RET
> M-= x term RET RET
>
> the text background color in term-mode stays= what it was set to by the
> solarized-light theme. A very similar in= vocation does not have this
> behavior:
>
> M-x term RET = RET
> C-c k RET yes RET
> M-x load-theme RET solarized-light RE= T
> M-x disable-theme RET solarized-light RET
> M-x term RET RE= T
>
> i.e. If term mode gets to run before loading the theme, n= o bug.
>

This bug is still present.

It looks like solar= ized still sets the obsoleted variables
term-default-fg-color and term-d= efault-bg-color, but still, the bug is
in custom.el and it's related= to Bug#21355.

Here's a recipe:
Save this theme into test-bug= 20766-theme.el, and arrange to load it.
(deftheme test-bug20766)

= (custom-theme-set-variables
=C2=A0'test-bug20766
=C2=A0'(test= -option 'foo))

(provide-theme 'test-bug20766)

emacs -= Q

M-x load-theme RET test-bug20766
test-option is not yet known, = so custom stores the theme setting under
the saved-value property of tes= t-option.

M-x disable-theme RET test-bug20766
The saved-value pro= perty should be nil, because the theme setting is no
longer relevant.=C2= =A0 However, it's still ('foo).

Then eval the following defc= ustom:
(defcustom test-option 'bar "..."
:type 's= ymbol
:group 'emacs)

M-: test-option =3D=3D> foo, which = is wrong.

In the original recipe, that is how term-default-fg-color = and
term-default-bg-color get the solarized theme setting after loading<= br>term.
--0000000000009899f905b36f5309--