GNU bug report logs - #38812
28.0.50; Custom: Problem with reverting some session's customizations

Previous Next

Package: emacs;

Reported by: Mauro Aranda <maurooaranda <at> gmail.com>

Date: Mon, 30 Dec 2019 14:12:02 UTC

Severity: normal

Tags: patch

Found in version 28.0.50

Done: Eli Zaretskii <eliz <at> gnu.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 38812 in the body.
You can then email your comments to 38812 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#38812; Package emacs. (Mon, 30 Dec 2019 14:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mauro Aranda <maurooaranda <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Dec 2019 14:12:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: 28.0.50; Custom: Problem with reverting some session's customizations
Date: Mon, 30 Dec 2019 11:11:24 -0300
[Message part 1 (text/plain, inline)]
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))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38812; Package emacs. (Tue, 31 Dec 2019 14:23:01 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 38812 <at> debbugs.gnu.org
Subject: Re: bug#38812: 28.0.50;
 Custom: Problem with reverting some session's customizations
Date: Tue, 31 Dec 2019 11:22:27 -0300
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]
[0001-Preserve-the-saved-value-property-when-doing-session.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Mauro Aranda <maurooaranda <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 31 Dec 2019 14:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38812; Package emacs. (Tue, 31 Dec 2019 16:05:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 38812 <at> debbugs.gnu.org
Subject: Re: bug#38812: 28.0.50;
 Custom: Problem with reverting some session's customizations
Date: Tue, 31 Dec 2019 18:04:52 +0200
> From: Mauro Aranda <maurooaranda <at> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38812; Package emacs. (Tue, 31 Dec 2019 17:22:01 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38812 <at> debbugs.gnu.org
Subject: Re: bug#38812: 28.0.50;
 Custom: Problem with reverting some session's customizations
Date: Tue, 31 Dec 2019 14:21:09 -0300
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> 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.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38812; Package emacs. (Tue, 31 Dec 2019 17:26:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 38812 <at> debbugs.gnu.org
Subject: Re: bug#38812: 28.0.50;
 Custom: Problem with reverting some session's customizations
Date: Tue, 31 Dec 2019 19:25:23 +0200
> From: Mauro Aranda <maurooaranda <at> gmail.com>
> Date: Tue, 31 Dec 2019 14:21:09 -0300
> Cc: 38812 <at> 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)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38812; Package emacs. (Tue, 31 Dec 2019 17:39:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 38812 <at> debbugs.gnu.org
Subject: Re: bug#38812: 28.0.50;
 Custom: Problem with reverting some session's customizations
Date: Tue, 31 Dec 2019 14:38:02 -0300
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Mauro Aranda <maurooaranda <at> gmail.com>
>> Date: Tue, 31 Dec 2019 14:21:09 -0300
>> Cc: 38812 <at> 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.
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 01 Jan 2020 17:52:02 GMT) Full text and rfc822 format available.

Notification sent to Mauro Aranda <maurooaranda <at> gmail.com>:
bug acknowledged by developer. (Wed, 01 Jan 2020 17:52:02 GMT) Full text and rfc822 format available.

Message #27 received at 38812-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 38812-done <at> debbugs.gnu.org
Subject: Re: bug#38812: 28.0.50;
 Custom: Problem with reverting some session's customizations
Date: Wed, 01 Jan 2020 19:51:39 +0200
> From: Mauro Aranda <maurooaranda <at> gmail.com>
> Date: Tue, 31 Dec 2019 14:38:02 -0300
> Cc: 38812 <at> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 Jan 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 88 days ago.

Previous Next


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