From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: More bugs in Custom themes Date: Mon, 11 Jul 2005 01:34:58 -0400 Message-ID: References: <200506300152.j5U1qBo01566@raven.dms.auburn.edu> <200507010104.j6114rD07388@raven.dms.auburn.edu> <200507030215.j632FHG09392@raven.dms.auburn.edu> <200507060332.j663WlA21625@raven.dms.auburn.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1121063291 28331 80.91.229.2 (11 Jul 2005 06:28:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2005 06:28:11 +0000 (UTC) Cc: abraham@dina.kvl.dk, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 11 08:28:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Drrlw-0002BH-7e for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2005 08:28:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DrrnU-00011A-9F for ged-emacs-devel@m.gmane.org; Mon, 11 Jul 2005 02:29:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DrraG-0006CW-QI for emacs-devel@gnu.org; Mon, 11 Jul 2005 02:16:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DrrXx-0005ky-L3 for emacs-devel@gnu.org; Mon, 11 Jul 2005 02:13:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DrrXw-00058R-TD for emacs-devel@gnu.org; Mon, 11 Jul 2005 02:13:40 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Drr6b-0007h4-AD for emacs-devel@gnu.org; Mon, 11 Jul 2005 01:45:25 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DrqwU-0007fi-Pl; Mon, 11 Jul 2005 01:34:58 -0400 Original-To: Luc Teirlinck In-reply-to: <200507060332.j663WlA21625@raven.dms.auburn.edu> (message from Luc Teirlinck on Tue, 5 Jul 2005 22:32:47 -0500 (CDT)) 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:40753 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40753 but I think we already discussed the proper conflict resolution method. What I suggested was that the themes are listed in an order, and later themes override earlier themes. It is a little bit more complex than that. The user can enable or disable themes, save options through Custom, set them through Custom, reset them to standard through Custom and change them using setq. I suggest that it will be easy to figure out what to do in each of these cases if we keep in mind the order of priority that these various actions ought to obey: Individual user custom settings. Settings from themes (in reverse order of precedence) Default values. As for settings with setq, those should make the variable a rogue, as now. When the variable is a rogue, theme operations should not touch it. When the option has been set by a theme, the current code says that it has been "Saved and set". I believe that this is unhelpful and confusing and that it should say instead that it has been set by a theme, preferably saying which theme. I agree. I don't think that should be TOO hard. Disabling any of the themes works by getting rid of all of them, then reloading the ones that remain enabled. To me, that seems to be a contorted way to do it. It is more work for the computer than necessary, but that's what computers are for. I proposed this because it should be easy to implement with simple code. Thus, we can get it working easily. However, looking at the code for custom-do-theme-reset, it seems that I don't have to do much work to make it work right without reloading loaded themes. All the data is available in the theme-value properties. I just have to rewrite the code to DTRT in each case. I've done some of that already. Also, do not forget that when the user asks to disable a theme, the value you want to restore will sometimes be a setq-ed value, thus not associated with any theme, In the scheme as I've proposed it, that cannot happen.