From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lars Hansen Newsgroups: gmane.emacs.devel Subject: Re: [BUG] widget-field-overlay becomes wrong Date: Wed, 14 Jul 2004 09:00:31 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <40F4DA0F.5000608@math.ku.dk> References: <40E28BE8.4030300@math.ku.dk> <40EF09AA.3010207@math.ku.dk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030102090700030404030302" X-Trace: sea.gmane.org 1089788474 24973 80.91.224.253 (14 Jul 2004 07:01:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Jul 2004 07:01:14 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jul 14 09:01:04 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BkdlI-0001XW-00 for ; Wed, 14 Jul 2004 09:01:04 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BkdlH-0006Dw-00 for ; Wed, 14 Jul 2004 09:01:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bkdnh-0003wk-Aa for emacs-devel@quimby.gnus.org; Wed, 14 Jul 2004 03:03:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BkdnZ-0003w1-8h for emacs-devel@gnu.org; Wed, 14 Jul 2004 03:03:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BkdnY-0003vp-Dx for emacs-devel@gnu.org; Wed, 14 Jul 2004 03:03:25 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BkdnY-0003vm-9h for emacs-devel@gnu.org; Wed, 14 Jul 2004 03:03:24 -0400 Original-Received: from [213.170.224.162] (helo=smtp.kabelnettet.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Bkdkp-0006Om-61 for emacs-devel@gnu.org; Wed, 14 Jul 2004 03:00:35 -0400 Original-Received: from math.ku.dk (0x52b410de.dhcp.kabelnettet.dk [82.180.16.222]) by smtp.kabelnettet.dk (Postfix) with ESMTP id D527A60994A; Wed, 14 Jul 2004 09:00:31 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk X-Accept-Language: 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: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:25675 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25675 This is a multi-part message in MIME format. --------------030102090700030404030302 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Per Abrahamsen wrote: >I think the problem in the example is that the "menu-choice" widget is >not "static text". Whenever you make a new choice, the widget rewrite >itself from scratch. > Exactly. And that goes for editable text fields too. But never the less, text generated by :format is called "static text" in the manual. I may be a good idea to avoid the term "static text"; it is misleading. >The second part of your patch should be applied. > > We need changes in the first part as well because it is incorrect as it is now. What about the attached rewrite without the term "static text"? --------------030102090700030404030302 Content-Type: text/plain; name="widget.texi.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="widget.texi.diff" *** widget-1.26.texi Thu Apr 29 21:25:30 2004 --- /home/lh/cvsroot/emacs/man/widget.texi Wed Jul 14 08:52:33 2004 *************** *** 213,226 **** Editable text fields are created by the @code{editable-field} widget. ! An editable field must be surrounded by static text on both sides, that ! is, text that does not change in the lifetime of the widget. If the ! field extends to the end of the line, the terminating line-feed character ! will count as the necessary static text on that end, but you will have ! to provide the static text before the field yourself. The ! @code{:format} keyword is useful for generating the static text; for ! instance, if you give it a value of @code{"Name: %v"}, the "Name: " part ! will count as the static text. The editing text fields are highlighted with the @code{widget-field-face} face, making them easy to find. --- 213,228 ---- Editable text fields are created by the @code{editable-field} widget. ! In an @code{editable-field} widget, the editable field is not allowed ! to be adjacent to a neighbouring widget, there must be some text in ! between. This text must be part of the @code{editable-field} widget ! itself or inserted with @code{widget-insert}. The @code{:format} ! keyword is useful for generating the necessary text; for instance, if ! you give it a value of @code{"Name: %v "}, the "Name: " part will ! provide the text before the field and the trailing space will provide ! the text after the field. If no @code{:size} argument is given the ! field will extends to the end of the line, and then the terminating ! line-feed character will count as the necessary text after the field. The editing text fields are highlighted with the @code{widget-field-face} face, making them easy to find. *************** *** 345,350 **** --- 347,353 ---- (widget-insert "Here is some documentation.\n\nName: ") (widget-create 'editable-field :size 13 + :format "%v " ; Static text after the field! "My Name") (widget-create 'menu-choice :tag "Choose" --------------030102090700030404030302 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------030102090700030404030302--