From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Bad value to a defcustom makes choices unavailable Date: Tue, 02 Aug 2005 19:26:56 +0200 Message-ID: <42EFACE0.6000106@student.lu.se> References: <42EE43B6.2090409@student.lu.se> <200508011741.j71HflT04394@raven.dms.auburn.edu> <42EE60DA.6020701@student.lu.se> <200508011758.j71HwZS04956@raven.dms.auburn.edu> <42EE665A.3060208@student.lu.se> <200508011820.j71IKNr05302@raven.dms.auburn.edu> <42EE6A0C.7050807@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1123004496 13118 80.91.229.2 (2 Aug 2005 17:41:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Aug 2005 17:41:36 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 02 19:41:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E00kl-0005Mq-QD for ged-emacs-devel@m.gmane.org; Tue, 02 Aug 2005 19:40:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E00nT-0001Xv-Ht for ged-emacs-devel@m.gmane.org; Tue, 02 Aug 2005 13:43:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E00f8-0000co-LC for emacs-devel@gnu.org; Tue, 02 Aug 2005 13:34:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E00et-0000UU-FU for emacs-devel@gnu.org; Tue, 02 Aug 2005 13:34:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E00es-0000Su-TT for emacs-devel@gnu.org; Tue, 02 Aug 2005 13:34:30 -0400 Original-Received: from [81.228.11.98] (helo=pne-smtpout1-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E00k0-0006b0-J5 for emacs-devel@gnu.org; Tue, 02 Aug 2005 13:39:48 -0400 Original-Received: from [192.168.123.121] (83.249.205.6) by pne-smtpout1-sn1.fre.skanova.net (7.2.060.1) id 42B813B00068304B; Tue, 2 Aug 2005 19:26:58 +0200 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en Original-To: Per Abrahamsen In-Reply-To: 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:41432 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41432 Per Abrahamsen wrote: >>Let us say that someone writes a defcustom in a package he distributes. >>Later she/he for some reason changes the list of choices. If a user has >>saved a value through custom that now no longer exists he can not >>correct it through custom. >> >> > >He can, unless that functionality has been changed. Customize will >present the invalid value in an sexp widget. Which seems the most >reasonable thing to in the general case. > >If he don't know what to do with an sexp, he can do a "Reset to >standard value", and then use the structured editor. > > > >>I think it would be good then if the list of choices were available. >> >> > >You could special case the "choice" widget (most widget can have >"invalid value", so the problem is general). But I don't think the >code complexity would outweigh the minor convenience of not having to >do a "Reset to standard" first. > > I believe "Reset to standard value" has changed name to "Erase Customization". Yes, you can use that, but the list of choices does not appear until next time you run customize. Is not that quite a bit confusing? Are you saying that it would be hard to redraw the widget in those cases? Here is some new test code for those who want to see what is going on: (custom-set-variables '(test-choice "Bad choice")) (setq test-choice "A very bad choice!") (customize-option-other-window 'test-choice) (defcustom test-choice "AAA" "Testing of bad choices." :type '(choice (const "AAA") (const "BBB")))