From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: :format strings in Custom ending in %h Date: Fri, 22 Aug 2003 21:44:41 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200308230244.h7N2ifk01430@raven.dms.auburn.edu> References: <200308210154.h7L1sJc21082@raven.dms.auburn.edu> <200308212100.h7LL0d125524@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1061633412 21049 80.91.224.253 (23 Aug 2003 10:10:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 23 Aug 2003 10:10:12 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Aug 23 12:10:10 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19qVLW-0007Bc-00 for ; Sat, 23 Aug 2003 12:10:10 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19qVQ6-0002rn-00 for ; Sat, 23 Aug 2003 12:14:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19qV8H-0004zJ-7K for emacs-devel@quimby.gnus.org; Sat, 23 Aug 2003 05:56:29 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19qP4O-0008J9-4o for emacs-devel@gnu.org; Fri, 22 Aug 2003 23:28:04 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19qP0E-0005uT-Ka for emacs-devel@gnu.org; Fri, 22 Aug 2003 23:24:17 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19qOzv-0005n7-Tk for emacs-devel@gnu.org; Fri, 22 Aug 2003 23:23:27 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by mx20.gnu.org with esmtp (Exim 4.20) id 19qOrs-0007c9-6w for emacs-devel@gnu.org; Fri, 22 Aug 2003 23:15:08 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.9/8.12.9) with ESMTP id h7N2kqeQ024167; Fri, 22 Aug 2003 21:46:52 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id h7N2ifk01430; Fri, 22 Aug 2003 21:44:41 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: abraham@dina.kvl.dk In-reply-to: (message from Per Abrahamsen on Fri, 22 Aug 2003 13:22:26 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:16101 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16101 Per Abrahamsen wrote: The patch I posted solved the problem for me. Not only does that not work empirically for me, I believe that the following excerpts from wid-edit.el show that your patch can not possibly have any effect. Did you really follow my recipe literally and did you really not use any code that is different from the current uncustomized CVS? The problem seems to be: (define-widget 'other 'sexp (define-widget 'sexp 'editable-field (define-widget 'editable-field 'default Why not: (define-widget 'other 'item with suitable further adjustments, which would, combined with your patch, solve the problem (or so I believe) ? (define-widget 'other 'sexp "Matches any value, but doesn't let the user edit the value. So why pattern if after an editable-field? The details: Your patch in: (define-widget 'item 'default putting in: :value-delete 'widget-children-value-delete can, I believe, not possibly have any effect for 'other. I followed the sequence of define-widget's starting at 'other up to 'default: (define-widget 'other 'sexp (define-widget 'sexp 'editable-field (define-widget 'editable-field 'default "An editable text field." :convert-widget 'widget-value-convert-widget :keymap widget-field-keymap :format "%v" :help-echo "M-TAB: complete field; RET: enter value" :value "" :prompt-internal 'widget-field-prompt-internal :prompt-history 'widget-field-history :prompt-value 'widget-field-prompt-value :action 'widget-field-action :validate 'widget-field-validate :valid-regexp "" :error "Field's value doesn't match allowed forms" :value-create 'widget-field-value-create :value-delete 'widget-field-value-delete :value-get 'widget-field-value-get :match 'widget-field-match) The last define-widget contains: :value-delete 'widget-field-value-delete The two previous define-widgets do not override this. Where does 'item fit into all of this? Your patch works for 'const because: (define-widget 'const 'item But my example involves 'other. I checked with edebug that :value-delete for the widget in question is indeed 'widget-field-value-delete, as expected from the above code excerpts. Sincerely, Luc.