unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: David Engster <deng@randomsample.de>
Cc: 8720@debbugs.gnu.org
Subject: bug#8720: 24.0.50; load-theme in .emacs makes it easy to inadvertently delete custom-set variables
Date: Tue, 28 Jun 2011 00:34:04 -0400	[thread overview]
Message-ID: <yyx7h864ls3.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87hb84pt51.fsf@engster.org> (David Engster's message of "Sun, 05 Jun 2011 10:41:30 +0200")

David Engster <deng@randomsample.de> writes:

> I'm afraid even with your patch the actual feature will still not
> work, meaning you'll be asked if you want to "treat this theme as
> safe" every time you start Emacs, because the customize section simply
> hasn't been read yet.

Yes, you're right.

> I guess to reliably use customize during startup, it would have to
> automatically read the custom sections as soon as it is loaded.  Is that
> somehow possible?

Not without making Emacs startup way more complicated than it is.

Since there appears to be no way to really solve this problem, I suggest
simply mitigating it, by adding an optional argument to `load-theme'
skips the confirmation.  Users who wish to call `load-theme' in the init
file can then use this argument.

If no one has a better suggestion, I will go ahead and implement this,
and update the relevant docstrings to mention this pitfall.





  reply	other threads:[~2011-06-28  4:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=yyx7h864ls3.fsf@fencepost.gnu.org \
    --to=cyd@stupidchicken.com \
    --cc=8720@debbugs.gnu.org \
    --cc=deng@randomsample.de \
    /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).