all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8720: 24.0.50; load-theme in .emacs makes it easy to inadvertently delete custom-set variables
@ 2011-05-23 19:58 David Engster
  2011-06-04 23:59 ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: David Engster @ 2011-05-23 19:58 UTC (permalink / raw)
  To: 8720

This is with Emacs revno 104332 on GNU/Linux.

Here's a recipe:

* Create a minimal .emacs file, containing the following:

-------------------
;; Load a theme - it doesn't matter which.
(load-theme 'sometheme)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(user-mail-address "deng@randomsample.de"))
-------------------

* Start Emacs with that init file. Answer both questions "Really load?"
  and "Treat this theme as safe in future sessions?" with 'y'.

* Exit Emacs.

* The .emacs file will now look like this:

-------------------
;; Load a theme - it doesn't matter which
(load-theme 'zenburn)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-safe-themes (quote ("79debafda48631fbb02f822cab5bb8d50df6e3f6" default))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
--------------------

As you can see, the existing customization for user-mail-address was
deleted; in fact, every existing entry there will be deleted.  I know
this can be fixed by putting the `load-theme' at the end of the .emacs
file, but this isn't mentioned in the doc-string and I'd still consider
this at least as unexpected behavior.

-David





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

end of thread, other threads:[~2011-06-28  4:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-23 19:58 bug#8720: 24.0.50; load-theme in .emacs makes it easy to inadvertently delete custom-set variables David Engster
2011-06-04 23:59 ` Chong Yidong
2011-06-05  8:41   ` David Engster
2011-06-28  4:34     ` Chong Yidong
2011-06-06 17:13   ` Stefan Monnier

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.