unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations
@ 2019-12-30 14:11 Mauro Aranda
  2019-12-31 14:22 ` Mauro Aranda
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Aranda @ 2019-12-30 14:11 UTC (permalink / raw)
  To: 38812

[-- Attachment #1: Type: text/plain, Size: 21870 bytes --]

Hello.

The way I've found to reproduce this bug requires the init file to have the
following contents:
(custom-set-variables
 '(compile-command "make ")
 '(custom-enabled-themes '(deeper-blue))
 '(dired-kept-versions 4))

Although, the variables don't have to be those, and neither the theme has
to be deeper-blue.  More generally, there has to be one setting before the
customization of custom-enabled-themes, and one after.  And the theme can
be whatever theme that Emacs can find.  The theme should not customize the
variables being customized before and after.

Steps to reproduce:
1. Start emacs.
2. M-x customize-variable compile-command
3. In the *Customize* buffer, modify the value of compile-command to any
value (e.g., "make -s ").
4. Now with the State button choose "Set for current session".
5. And now revert your choice with: Revert This Session's Customization.

There is no change in the value of compile-command.  It is still the
customized value, after reverting.  IOW, reverting hasn't restored the
saved value in the init file.
Furthermore, (get 'compile-command 'saved-value) evaluates to the
customized value, so setting the variable for the current session has
modified it.  That should not happen.

Compare the previous result with the following:

2. M-x customize-variable dired-kept-versions
3. In the *Customize* buffer, modify the value of dired-kept-versions to any
other value (e.g., 3).
4. Now with the State button choose "Set for current session".
5. And now revert your choice with: Revert This Session's Customization.

The result is that dired-kept-versions is back at value 4, which is the
saved
value in the init file.  This behavior is correct.


This bug affects the customizations that happen before customizing
custom-enabled-themes, that's why in the init file is necessary to have one
customization before and one after, to be able to compare the results.
Since custom maintains the arguments to custom-set-variables in alphabetic
order, all variables that would be sorted before custom-enabled-themes
are affected by this bug.


In GNU Emacs 28.0.50 (build 16, i686-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2019-12-30 built on the-blackbeard
Repository revision: e1fd6b1107179270b6daeab52053ffb2461531a9
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Ubuntu 16.04.6 LTS

Recent messages:
Loading /home/the-blackbeard/.emacs.d/.custom.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

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

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS:
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-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
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-latex hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-latex
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-crypt
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-crypt
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-sed hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-sed
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-footnote
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-footnote
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-src hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-src
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-html hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-html
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-datetree
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-datetree
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-macs hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-macs
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-texinfo
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-texinfo
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-matlab
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-matlab
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-coq hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-coq
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-mobile
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-mobile
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-fortran
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-fortran
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-icalendar
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-icalendar
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-mscgen
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-mscgen
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-lisp hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-lisp
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-haskell
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-haskell
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-maxima
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-maxima
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-id hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-id
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-macro
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-macro
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-beamer
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-beamer
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-C hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-C
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-org hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-org
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-feed hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-feed
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-timer
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-timer
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-ocaml hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-ocaml
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-awk hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-awk
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-mouse
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-mouse
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-asymptote
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-asymptote
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-sqlite
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-sqlite
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-ebnf hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-ebnf
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-shen hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-shen
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-habit
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-habit
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-ditaa hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-ditaa
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-compat
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-compat
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-inlinetask
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-inlinetask
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-table
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-table
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-stan hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-stan
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-element
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-element
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-dot hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-dot
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-plantuml
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-plantuml
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-lua hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-lua
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-clock
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-clock
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-J hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-J
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-lob hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-lob
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-indent
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-indent
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-ctags
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-ctags
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-lint hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-lint
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-screen
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-screen
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-exp hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-exp
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-tempo
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-tempo
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-eval hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-eval
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-ascii hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-ascii
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-table hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-table
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-sql hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-sql
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-plot hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-plot
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-odt hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-odt
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-install
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-install
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-calc hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-calc
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-publish
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-publish
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-pcomplete
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-pcomplete
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-agenda
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-agenda
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-clojure
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-clojure
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-org hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-org
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-archive
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-archive
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-gnuplot
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-gnuplot
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-ruby hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-ruby
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-forth hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-forth
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-md hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-md
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-tangle
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-tangle
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-js hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-js
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-duration
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-duration
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-ref hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-ref
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-goto hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-goto
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ox-man hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ox-man
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-processing
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-processing
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-colview
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-colview
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-abc hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-abc
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-python
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-python
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-vala hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-vala
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-entities
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-entities
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-capture
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-capture
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-list hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-list
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-octave
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-octave
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-io hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-io
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-latex hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-latex
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-lilypond
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-lilypond
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-R hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-R
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-hledger
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-hledger
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-attach
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-attach
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-shell hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-shell
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-core hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-core
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-groovy
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-groovy
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-picolisp
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-picolisp
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-emacs-lisp
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-emacs-lisp
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-version
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-version
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-comint
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-comint
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-scheme
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-scheme
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-css hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-css
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-protocol
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-protocol
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-java hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-java
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-faces
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-faces
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/org-loaddefs
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/org-loaddefs
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-ledger
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-ledger
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-perl hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-perl
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-sass hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-sass
/home/the-blackbeard/.emacs.d/elpa/org-plus-contrib-20190923/ob-makefile
hides
/home/the-blackbeard/Documentos/Programacion/emacs/emacs/lisp/org/ob-makefile

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
deeper-blue-theme info slime-autoloads package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x 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 tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer 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 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 inotify lcms2 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 8 71230 6087)
 (symbols 24 8332 1)
 (strings 16 24942 2715)
 (string-bytes 1 907664)
 (vectors 8 13050)
 (vector-slots 4 180354 7826)
 (floats 8 27 13)
 (intervals 28 237 0)
 (buffers 568 12)
 (heap 1024 9744 809))

[-- Attachment #2: Type: text/html, Size: 22745 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations
  2019-12-30 14:11 bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations Mauro Aranda
@ 2019-12-31 14:22 ` Mauro Aranda
  2019-12-31 16:04   ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Aranda @ 2019-12-31 14:22 UTC (permalink / raw)
  To: 38812


[-- Attachment #1.1: Type: text/plain, Size: 1229 bytes --]

tags 38812 patch
thanks

> This bug affects the customizations that happen before customizing
> custom-enabled-themes, that's why in the init file is necessary to have
one
> customization before and one after, to be able to compare the results.
> Since custom maintains the arguments to custom-set-variables in alphabetic
> order, all variables that would be sorted before custom-enabled-themes
> are affected by this bug.

When custom-enabled-themes is customized, its set function enable the
themes.  When that happens, custom recalculates the value of the
variables, according to the enabled themes, with
custom-theme-recalc-variable.  For variables that already have a
theme-value property (i.e., the variables that were customized with
custom-set-variables before customizing custom-enabled-themes),
custom-theme-recalc-variable ends up putting in the 'saved-value
property the same cons cell that is in the 'theme-value property.

Customizing in a session changes the 'theme-value property of the
customized variable, and the above has the effect of changing the
'saved-value property as well.

A possible fix is to make custom-variable-theme-value return a new list.
I attach a patch that does that.

Best regards,
Mauro.

[-- Attachment #1.2: Type: text/html, Size: 1446 bytes --]

[-- Attachment #2: 0001-Preserve-the-saved-value-property-when-doing-session.patch --]
[-- Type: text/x-patch, Size: 1053 bytes --]

From 9b62de6aada7c41ef23441e02d48b262082bee5c Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda@gmail.com>
Date: Mon, 30 Dec 2019 11:37:02 -0300
Subject: [PATCH] Preserve the 'saved-value property when doing session's
 customizations

* lisp/custom.el (custom-variable-theme-value): Return a new list with
the value of variable, so the values of the properties 'theme-value
and 'saved-value are not shared.  (Bug#38812)
---
 lisp/custom.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/custom.el b/lisp/custom.el
index 26bdaae..e9bb0d3 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1483,8 +1483,8 @@ custom-variable-theme-value
 
 This function returns nil if no custom theme specifies a value for VARIABLE."
   (let ((theme-value (get variable 'theme-value)))
-    (if theme-value
-	(cdr (car theme-value)))))
+    (if theme-value ; ((THEME VALUE))
+	(list (cadar theme-value)))))
 
 (defun custom-theme-recalc-variable (variable)
   "Set VARIABLE according to currently enabled custom themes."
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations
  2019-12-31 14:22 ` Mauro Aranda
@ 2019-12-31 16:04   ` Eli Zaretskii
  2019-12-31 17:21     ` Mauro Aranda
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-12-31 16:04 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: 38812

> From: Mauro Aranda <maurooaranda@gmail.com>
> Date: Tue, 31 Dec 2019 11:22:27 -0300
> 
> * lisp/custom.el (custom-variable-theme-value): Return a new list with
> the value of variable, so the values of the properties 'theme-value
> and 'saved-value are not shared.  (Bug#38812)
> ---
>  lisp/custom.el | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lisp/custom.el b/lisp/custom.el
> index 26bdaae..e9bb0d3 100644
> --- a/lisp/custom.el
> +++ b/lisp/custom.el
> @@ -1483,8 +1483,8 @@ custom-variable-theme-value
>  
>  This function returns nil if no custom theme specifies a value for VARIABLE."
>    (let ((theme-value (get variable 'theme-value)))
> -    (if theme-value
> -	(cdr (car theme-value)))))
> +    (if theme-value ; ((THEME VALUE))
> +	(list (cadar theme-value)))))

This will look strange without some comment explaining why we do this.

And I have a question is: isn't it better not to use setcar in
custom-push-theme instead?





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations
  2019-12-31 16:04   ` Eli Zaretskii
@ 2019-12-31 17:21     ` Mauro Aranda
  2019-12-31 17:25       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Aranda @ 2019-12-31 17:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 38812

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>>  This function returns nil if no custom theme specifies a value for
VARIABLE."
>>    (let ((theme-value (get variable 'theme-value)))
>> -    (if theme-value
>> - (cdr (car theme-value)))))
>> +    (if theme-value ; ((THEME VALUE))
>> + (list (cadar theme-value)))))
>
> This will look strange without some comment explaining why we do this.

True.  I can add that comment.

> And I have a question is: isn't it better not to use setcar in
> custom-push-theme instead?

I thought of doing that, and use setf with alist-get to make the change
instead.  But I think we'll be better off if we avoid sharing the cons
cell inadvertedly, since that is prone to have bugs like this one.

Alternatively, we could create the list in custom-theme-recalc-variable,
to accomplish the same thing without changing the return value of
custom-variable-theme-value.  In that case, I think it would be
convenient to change the doc string of custom-variable-theme-value, to
say it returns some cdr.

To me, either the patch I posted (with an additional explanatory
comment, of course) or the latter option sound better, but I won't argue
too much if you think otherwise.

Best regards,
Mauro.

[-- Attachment #2: Type: text/html, Size: 1467 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations
  2019-12-31 17:21     ` Mauro Aranda
@ 2019-12-31 17:25       ` Eli Zaretskii
  2019-12-31 17:38         ` Mauro Aranda
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-12-31 17:25 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: 38812

> From: Mauro Aranda <maurooaranda@gmail.com>
> Date: Tue, 31 Dec 2019 14:21:09 -0300
> Cc: 38812@debbugs.gnu.org
> 
> > And I have a question: isn't it better not to use setcar in
> > custom-push-theme instead?
> 
> I thought of doing that, and use setf with alist-get to make the change
> instead.  But I think we'll be better off if we avoid sharing the cons
> cell inadvertedly, since that is prone to have bugs like this one.

And I actually think that a problem should be fixed where it is
caused.  There's nothing wrong per se with sharing portions of Lisp
data structures.

> Alternatively, we could create the list in custom-theme-recalc-variable,
> to accomplish the same thing without changing the return value of
> custom-variable-theme-value.  In that case, I think it would be
> convenient to change the doc string of custom-variable-theme-value, to
> say it returns some cdr.
> 
> To me, either the patch I posted (with an additional explanatory
> comment, of course) or the latter option sound better, but I won't argue
> too much if you think otherwise.

My alternative patch is below.  WDYT?

diff --git a/lisp/custom.el b/lisp/custom.el
index 26bdaae2c2..7ed85b22e8 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -886,7 +886,10 @@ custom-push-theme
 	(put theme 'theme-settings
 	     (cons (list prop symbol theme value)
 		   (delq res theme-settings)))
-	(setcar (cdr setting) value)))
+        ;; It's tempting to use setcar here, but that could
+        ;; inadvertently modify other properties in SYMBOL's proplist,
+        ;; if those just happen to share elements with the value of PROP.
+        (put symbol prop (cons (list theme value) (delq setting old)))))
      ;; Add a new setting:
      (t
       (when (custom--should-apply-setting theme)





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations
  2019-12-31 17:25       ` Eli Zaretskii
@ 2019-12-31 17:38         ` Mauro Aranda
  2020-01-01 17:51           ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Mauro Aranda @ 2019-12-31 17:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 38812

[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Mauro Aranda <maurooaranda@gmail.com>
>> Date: Tue, 31 Dec 2019 14:21:09 -0300
>> Cc: 38812@debbugs.gnu.org
>>
>> > And I have a question: isn't it better not to use setcar in
>> > custom-push-theme instead?
>>
>> I thought of doing that, and use setf with alist-get to make the change
>> instead.  But I think we'll be better off if we avoid sharing the cons
>> cell inadvertedly, since that is prone to have bugs like this one.
>
> And I actually think that a problem should be fixed where it is
> caused.  There's nothing wrong per se with sharing portions of Lisp
> data structures.

Of course.  But I said "inadvertedly".  Now we are aware.

>> Alternatively, we could create the list in custom-theme-recalc-variable,
>> to accomplish the same thing without changing the return value of
>> custom-variable-theme-value.  In that case, I think it would be
>> convenient to change the doc string of custom-variable-theme-value, to
>> say it returns some cdr.
>>
>> To me, either the patch I posted (with an additional explanatory
>> comment, of course) or the latter option sound better, but I won't argue
>> too much if you think otherwise.
>
> My alternative patch is below.  WDYT?
>
> diff --git a/lisp/custom.el b/lisp/custom.el
> index 26bdaae2c2..7ed85b22e8 100644
> --- a/lisp/custom.el
> +++ b/lisp/custom.el
> @@ -886,7 +886,10 @@ custom-push-theme
>   (put theme 'theme-settings
>       (cons (list prop symbol theme value)
>     (delq res theme-settings)))
> - (setcar (cdr setting) value)))
> +        ;; It's tempting to use setcar here, but that could
> +        ;; inadvertently modify other properties in SYMBOL's proplist,
> +        ;; if those just happen to share elements with the value of PROP.
> +        (put symbol prop (cons (list theme value) (delq setting old)))))
>       ;; Add a new setting:
>       (t
>        (when (custom--should-apply-setting theme)

Looks good, thank you.

[-- Attachment #2: Type: text/html, Size: 2550 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations
  2019-12-31 17:38         ` Mauro Aranda
@ 2020-01-01 17:51           ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2020-01-01 17:51 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: 38812-done

> From: Mauro Aranda <maurooaranda@gmail.com>
> Date: Tue, 31 Dec 2019 14:38:02 -0300
> Cc: 38812@debbugs.gnu.org
> 
> > My alternative patch is below.  WDYT?
> >
> > diff --git a/lisp/custom.el b/lisp/custom.el
> > index 26bdaae2c2..7ed85b22e8 100644
> > --- a/lisp/custom.el
> > +++ b/lisp/custom.el
> > @@ -886,7 +886,10 @@ custom-push-theme
> >   (put theme 'theme-settings
> >       (cons (list prop symbol theme value)
> >     (delq res theme-settings)))
> > - (setcar (cdr setting) value)))
> > +        ;; It's tempting to use setcar here, but that could
> > +        ;; inadvertently modify other properties in SYMBOL's proplist,
> > +        ;; if those just happen to share elements with the value of PROP.
> > +        (put symbol prop (cons (list theme value) (delq setting old)))))
> >       ;; Add a new setting:
> >       (t
> >        (when (custom--should-apply-setting theme)
> 
> Looks good, thank you.

Thanks, pushed.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-01-01 17:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-30 14:11 bug#38812: 28.0.50; Custom: Problem with reverting some session's customizations Mauro Aranda
2019-12-31 14:22 ` Mauro Aranda
2019-12-31 16:04   ` Eli Zaretskii
2019-12-31 17:21     ` Mauro Aranda
2019-12-31 17:25       ` Eli Zaretskii
2019-12-31 17:38         ` Mauro Aranda
2020-01-01 17:51           ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).