unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Engster <deng@randomsample.de>
To: 8720@debbugs.gnu.org
Subject: bug#8720: 24.0.50; load-theme in .emacs makes it easy to inadvertently delete custom-set variables
Date: Mon, 23 May 2011 21:58:13 +0200	[thread overview]
Message-ID: <87vcx1tciy.fsf@engster.org> (raw)

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





             reply	other threads:[~2011-05-23 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 19:58 David Engster [this message]
2011-06-04 23:59 ` bug#8720: 24.0.50; load-theme in .emacs makes it easy to inadvertently delete custom-set variables Chong Yidong
2011-06-05  8:41   ` David Engster
2011-06-28  4:34     ` Chong Yidong
2011-06-06 17:13   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcx1tciy.fsf@engster.org \
    --to=deng@randomsample.de \
    --cc=8720@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).