* bug#20766: 24.5; disable-theme leaves lingering effects
@ 2015-06-08 1:09 Anders Papitto
2020-11-06 12:26 ` Mauro Aranda
0 siblings, 1 reply; 2+ messages in thread
From: Anders Papitto @ 2015-06-08 1:09 UTC (permalink / raw)
To: 20766
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.
the 'solarized-light' theme was installed from melpa via M-x
package-list-packages, and is upstream at
https://github.com/bbatsov/solarized-emacs. I'm not certain whether the
behavior is specific to that theme or not.
What I have observed is that there seems to be an interaction with the
variables term-default-fg-color and term-default-bg-color. They start as
:not-bound. Solarized light sets them to some value when loaded, and
resets them to :not-bound when unloaded. However, term mode also sets
them when started (both to 'nil) and seems to never reset them to
:not-bound.
Note: I don't have Emacs configured to send email, so I copied the
following from the bug-submission utility.
In GNU Emacs 24.5.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.27)
of 2015-05-13 on localhost
Windowing system distributor `The X.Org Foundation', version 11.0.11604000
Configured using:
`configure --disable-dependency-tracking
--prefix=/nix/store/wjlxah8xdid8qw12rsf3cjxvqj3zw69p-emacs-24.5
--with-x-toolkit=gtk2 --with-xft'
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
delete-backward-char: Text is read-only
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer 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 make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 71068 7059)
(symbols 48 17455 0)
(miscs 40 39 163)
(strings 32 9117 4368)
(string-bytes 1 264156)
(vectors 16 8912)
(vector-slots 8 383152 18293)
(floats 8 63 249)
(intervals 56 166 16)
(buffers 960 11)
(heap 1024 12859 662))
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#20766: 24.5; disable-theme leaves lingering effects
2015-06-08 1:09 bug#20766: 24.5; disable-theme leaves lingering effects Anders Papitto
@ 2020-11-06 12:26 ` Mauro Aranda
0 siblings, 0 replies; 2+ messages in thread
From: Mauro Aranda @ 2020-11-06 12:26 UTC (permalink / raw)
To: Anders Papitto; +Cc: 20766
[-- Attachment #1: Type: text/plain, Size: 1587 bytes --]
Anders Papitto <anderspapitto@gmail.com> 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.
[-- Attachment #2: Type: text/html, Size: 1950 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-06 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08 1:09 bug#20766: 24.5; disable-theme leaves lingering effects Anders Papitto
2020-11-06 12:26 ` Mauro Aranda
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.