From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Bug, probably related to Custom Themes. Date: Fri, 23 Dec 2005 17:18:51 -0600 (CST) Message-ID: <200512232318.jBNNIpH29992@raven.dms.auburn.edu> References: <200512210254.jBL2sj814876@raven.dms.auburn.edu> <87mziuqp2x.fsf@stupidchicken.com> <200512211840.jBLIefx25655@raven.dms.auburn.edu> <87vexiw3w4.fsf@stupidchicken.com> <200512212258.jBLMwt329838@raven.dms.auburn.edu> <200512230426.jBN4QQD18470@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1135380074 13162 80.91.229.2 (23 Dec 2005 23:21:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Dec 2005 23:21:14 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 24 00:21:12 2005 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EpwDk-0006b7-1I for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2005 00:21:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EpwEo-00070T-Ev for ged-emacs-devel@m.gmane.org; Fri, 23 Dec 2005 18:22:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EpwEc-0006zz-LT for emacs-devel@gnu.org; Fri, 23 Dec 2005 18:22:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EpwEZ-0006zb-F1 for emacs-devel@gnu.org; Fri, 23 Dec 2005 18:22:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EpwEZ-0006zY-9X for emacs-devel@gnu.org; Fri, 23 Dec 2005 18:21:59 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EpwDv-00026t-Ay; Fri, 23 Dec 2005 18:21:19 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.3+Sun/8.13.3) with ESMTP id jBNNKo6r011360; Fri, 23 Dec 2005 17:20:50 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id jBNNIpH29992; Fri, 23 Dec 2005 17:18:51 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (rms@gnu.org) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Fri, 23 Dec 2005 17:20:50 -0600 (CST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48274 Archived-At: Richard Stallman wrote: Yidong, could you fix this? Erase Customization should remove the `user' customization, and doing that consistently would put the theme value back into effect. That treats a symptom instead of the _real_ underlying bug. I have already given one more example of a "surface bug" that is caused by the same underlying bug: if a setting is set by a theme, the "Erase Customization" item of the State Menu is enabled, whereas it should not be, because it is not going to have any effect (which is confusing to the user, because the State message says and keeps saying: "SAVED and set"). That second surface bug is still very closely realted to the original one. I will now describe a third surface bug that is, at first view, completely unrelated. I load a theme file containing: '(column-number-mode t) Then I disable column-number-mode via the Options menu in the menu bar and then save my options _using the "Save Options" menu bar item_. column-number-mode is disabled for the current session, but if I start a new session column-number-mode is enabled again even though I saved my customization to disable it. What happens is that, since I just set column-number-mode to its standard-value, Custom thought that it just had to erase a line in my custom-set-variables form (that was not there). Instead, Custom should have written a line in my custom-set-variables form explicitly setting column-number-mode to nil, to override my theme. The above describes two more bugs in addition to the original one. What is really going on here? We agreed that we should treat Theme values as alternative default values. It is the only way to get consistent behavior. But we tell Custom that the Theme value is a user customization and that the default value is the no-themes default, by storing the theme value in saved-value instead of standard-value. Obviously whenever Custom checks the value of standard-value, a bug is likely to result. I listed three bugs of this type. I am pretty sure that you can find a fourth and a fifth and so on, just by grepping for customized-value in the Emacs source code. Sincerely, Luc.