From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Per Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: widget-choice-action Date: Wed, 03 Aug 2005 12:50:04 +0200 Organization: The Church of Emacs Message-ID: References: <200508021349.j72DnQ208932@raven.dms.auburn.edu> <200508022144.j72LiHA09885@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1123067459 21552 80.91.229.2 (3 Aug 2005 11:10:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2005 11:10:59 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 03 13:10:51 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E0H8z-0001Mh-Eu for ged-emacs-devel@m.gmane.org; Wed, 03 Aug 2005 13:10:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0HBj-0002jd-BM for ged-emacs-devel@m.gmane.org; Wed, 03 Aug 2005 07:13:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E0H4I-0008Ru-6P for emacs-devel@gnu.org; Wed, 03 Aug 2005 07:05:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E0H4D-0008On-PA for emacs-devel@gnu.org; Wed, 03 Aug 2005 07:05:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0H4C-0008F1-HO for emacs-devel@gnu.org; Wed, 03 Aug 2005 07:05:45 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1E0H4t-0000YY-UQ for emacs-devel@gnu.org; Wed, 03 Aug 2005 07:06:28 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1E0Gqe-0007fX-85 for emacs-devel@gnu.org; Wed, 03 Aug 2005 12:51:44 +0200 Original-Received: from sheridan.dina.kvl.dk ([130.225.40.227]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Aug 2005 12:51:44 +0200 Original-Received: from abraham by sheridan.dina.kvl.dk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Aug 2005 12:51:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-To: emacs-devel@gnu.org Original-Lines: 22 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: sheridan.dina.kvl.dk X-Face: +kRV2]2q}lixHkE{U)mY#+6]{AH=yN~S9@IFiOa@X6?GM|8MBp/ Mail-Copies-To: nobody User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:FbjrKP6nWQG31zsxmrfIRKfkPlY= 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:41452 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41452 Ok, I think the problem is that the original code try to extract the value of the choosen widget before it has been instantiated in the buffer. When a widget is instantiated, lots of stuff (mostly regarding quoting) can happen which can change its intrinsic value. The reason the the choosen value has to be remembered, is that the widget can also have its value set programmatically (with widget-value-set), not just from the user pressing the [value menu] button. But if the user first change the widget with the [value menu] button, and then something else set the value with (with widget-value-set), the :explicit-choice property will still be there, overwriting the match based choise. I don't remember if Customize call widget-value-set, maybe it does when you do some kind of reset. If so, your patch should break Customize when you first do an explicit choise, then a reset. If not, it will break other widget applications. However, if this is the only reason for :explicit-choice-value, it seems it would be much cleaner to simply erase the :explicit-choice attribute after use.