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: [BUG] widget-field-overlay becomes wrong Date: Wed, 30 Jun 2004 11:46:16 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <40E28BE8.4030300@math.ku.dk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000301050509030707040909" X-Trace: sea.gmane.org 1088588832 2837 80.91.224.253 (30 Jun 2004 09:47:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Jun 2004 09:47:12 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jun 30 11:47:02 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 1BfbgE-00043s-00 for ; Wed, 30 Jun 2004 11:47:02 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BfbgE-0005GB-00 for ; Wed, 30 Jun 2004 11:47:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bfbhw-0007yK-3g for emacs-devel@quimby.gnus.org; Wed, 30 Jun 2004 05:48:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BfbhK-0007lW-8E for emacs-devel@gnu.org; Wed, 30 Jun 2004 05:48:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BfbhH-0007ke-2r for emacs-devel@gnu.org; Wed, 30 Jun 2004 05:48:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BfbhG-0007kU-On for emacs-devel@gnu.org; Wed, 30 Jun 2004 05:48:06 -0400 Original-Received: from [213.170.224.162] (helo=smtp.kabelnettet.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BfbfW-00012y-OK for emacs-devel@gnu.org; Wed, 30 Jun 2004 05:46:18 -0400 Original-Received: from math.ku.dk (0x52b410e6.dhcp.kabelnettet.dk [82.180.16.230]) by smtp.kabelnettet.dk (Postfix) with ESMTP id 4C8826098B8 for ; Wed, 30 Jun 2004 11:46:16 +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: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 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:25322 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25322 This is a multi-part message in MIME format. --------------000301050509030707040909 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit One for the bug-list :-) When a widget-field-overlay goes all the way to the next or previous widget, it becomes wrong when that next or previous widget is changed. A test case is attached. Richard has written a comment in widget-default-value-set which probably is about the same thing. I don't know how to fix this bug, it seems quite tricky. Of cause a work-around is to never have a widget field adjacent to another widget. --------------000301050509030707040909 Content-Type: text/plain; name="widget-field-overlay-bug.el" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="widget-field-overlay-bug.el" ;----------------------------------------------------------------------------------------------- ; widget-field-overlay-bug.el ;----------------------------------------------------------------------------------------------- (require 'wid-edit) (defvar w1 nil) (defvar w2 nil) (defvar w3 nil) (defun widget-field-overlay-bug () (interactive) (switch-to-buffer "*test*") (setq w1 (widget-create 'editable-field :format "%v" :size 3 :value "xxx")) (setq w2 (widget-create 'editable-field :format " %v " :size 3 :value "foo")) (setq w3 (widget-create 'editable-field :format "%v" :size 3 :value "yyy")) (widget-setup) (message "w1: %s\nw2: %s\nw3: %s" (widget-get w1 :field-overlay) (widget-get w2 :field-overlay) (widget-get w3 :field-overlay)) (when (y-or-n-p "Continue ") (widget-value-set w2 "bar") (widget-setup) ;; Markers are OK, but overlay of w1 and w3 are wrong! (message "w1: %s\nw2: %s\nw3: %s" (widget-get w1 :field-overlay) (widget-get w2 :field-overlay) (widget-get w3 :field-overlay)) (display-buffer "*Messages*") (goto-char (point-max)))) --------------000301050509030707040909 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 --------------000301050509030707040909--