From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87vcx1tciy.fsf@engster.org> <87hb855esi.fsf@stupidchicken.com> <87hb84pt51.fsf@engster.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1309235729 15360 80.91.229.12 (28 Jun 2011 04:35:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Jun 2011 04:35:29 +0000 (UTC) Cc: 8720@debbugs.gnu.org To: David Engster Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 28 06:35:25 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QbQ1C-0000lX-E5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jun 2011 06:35:22 +0200 Original-Received: from localhost ([::1]:46855 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbQ1A-0001jm-SP for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jun 2011 00:35:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbQ0t-0001i7-It for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2011 00:35:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbQ0s-0006PK-IC for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2011 00:35:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbQ0s-0006PE-Ei for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2011 00:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QbQ0r-0002Tq-Ot; Tue, 28 Jun 2011 00:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jun 2011 04:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8720 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8720-submit@debbugs.gnu.org id=B8720.13092356529425 (code B ref 8720); Tue, 28 Jun 2011 04:35:01 +0000 Original-Received: (at 8720) by debbugs.gnu.org; 28 Jun 2011 04:34:12 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QbQ03-0002Ry-OD for submit@debbugs.gnu.org; Tue, 28 Jun 2011 00:34:11 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QbQ02-0002Rh-Et for 8720@debbugs.gnu.org; Tue, 28 Jun 2011 00:34:10 -0400 Original-Received: from cyd by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QbPzw-0000OT-C5; Tue, 28 Jun 2011 00:34:04 -0400 In-Reply-To: <87hb84pt51.fsf@engster.org> (David Engster's message of "Sun, 05 Jun 2011 10:41:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 28 Jun 2011 00:35:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47551 Archived-At: David Engster 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.