From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#75171: 30.0.50; Checklist widget inside a group does not initialize correctly Date: Fri, 3 Jan 2025 10:05:26 -0300 Message-ID: <94fb0321-f49b-4cbc-84a5-9696f9366cd3@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24681"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Al Haji-Ali , 75171@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 03 14:06:19 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tThNb-0006Cw-20 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jan 2025 14:06:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tThNO-00036V-Mu; Fri, 03 Jan 2025 08:06:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tThNM-00036F-SJ for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 08:06:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tThNL-0001VH-69 for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 08:06:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=gMLEqByYk/CUozpvhwo/cM5Iff4fVnIFC7V0OS4RVIE=; b=IxSUa8MPA3oSogJEm2B6x/5XpWeGCXuYXxRGZkReQxOaJjsbUfyFddOmN5SuEqdAevz30wIzQTw39eyQrckBYdpslbFQNrIlq3LOs5ihDNd91Nde537Qc1XAoI4FCQipS58RmTStLt6uhuoJP5Bo8mNiBi+dbo3VpOJVKnGtBmp2wybPVOef9j3MSl2ANjFJjsZgBNfgnqEenpALPN+F7+1fHXwAkrHWfUpRZGcmqMh45ohN+Hj/RSDm4Q1OxEYZUoLSWIRCeiPc97ug/LMnS2yPkV0bM64cVnl2vXuTAd5ahcRp+5gIcZ0vYBxIxFE6mMiYlgkqUJB0ewvmXWyD9w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tThNJ-00066a-Us for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 08:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2025 13:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75171 X-GNU-PR-Package: emacs Original-Received: via spool by 75171-submit@debbugs.gnu.org id=B75171.173590953923439 (code B ref 75171); Fri, 03 Jan 2025 13:06:01 +0000 Original-Received: (at 75171) by debbugs.gnu.org; 3 Jan 2025 13:05:39 +0000 Original-Received: from localhost ([127.0.0.1]:49953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tThMw-00065z-VK for submit@debbugs.gnu.org; Fri, 03 Jan 2025 08:05:39 -0500 Original-Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]:56496) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tThMu-00065k-Dn for 75171@debbugs.gnu.org; Fri, 03 Jan 2025 08:05:37 -0500 Original-Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2163b0c09afso167143645ad.0 for <75171@debbugs.gnu.org>; Fri, 03 Jan 2025 05:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735909530; x=1736514330; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=gMLEqByYk/CUozpvhwo/cM5Iff4fVnIFC7V0OS4RVIE=; b=dGAHsoQZWwBj+HlHDMfYQEucZcl20AjGEKlHUZd13+gyXqFiKOI6xMQIYaiTCI8qNY PNurhDeDAn72tpFXQxlTfuz9dprTj5VasQC1Nd4LUqFWVhDgy8OCnBTGtNyakRMmjXrE BC2YC588meP6OtsnZBwiAT+7qpLaybieGtgCCiM1SwmH3+IdqRYM3/rdxubXdnfBWqye zX8iQkymOx+adjqJcXD9yktcor2wG40KCg4GUma0eOGdy1PhBUQzcc8rsEH3m0Dzlnd+ uYhO5v5BvD3+fauNmS/j9Vms6mfaao/TLj+AZYoOwNRB/MrB9R+XDAVIcSOO1erRI6ln iLJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735909530; x=1736514330; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gMLEqByYk/CUozpvhwo/cM5Iff4fVnIFC7V0OS4RVIE=; b=P0UjC7Ljg9he7hBVIWmfFzwh2Zt3tLu7qEtZHKwPy0FASRAD0qJG11cEtzce5c1vt6 ApFfwXGWwTBnNU44lUDxZOqq/WpWUE5MVn9RJz9oAiiPEwbM4hfE49ZHsMPq+SfGVMRS dXrL5WT3BlBte263Lbsu1Fh9xXL2b32AqJSao8E9opopnQCXPvj5UvNr9b/bDYFuGVLc fzE04DPerW1KIuIgRAhJ1qsCFx4ynB4hkY+wiwPq8kYRFjf5vVWdJVQ4NMDTijCj6hfQ wzTdBeUJMDxb/2u9S4pXZRDmI2WDjDW97KO8Y/IF8YsfnlJdSW9lZg2DJurMH8f3PbvH yhdg== X-Forwarded-Encrypted: i=1; AJvYcCVF1eAukKC0Pz2WtXUZFdWYNc2SZlGsbIBaYWk/Lj+/FVKjnUEV7kjrJV/HDaW4cXrPSMiY4Q==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwXJjUdr2Ug9scM0auhE+Se1a2jrNWs8o5UmF6jV2gthP5Hlh2L nUTIVXbxxOav6luRxk8JObmgJA3SYFEpKc2iLnUp/JBkoki+fj8i X-Gm-Gg: ASbGncsga69NCb9/fQ2SPzvtyp6jcxZO4bC6bSxobWrp5F/TAUXWqWVf123Q6c4zt03 b9p9zje/xpohfiWKVneZ7kXOMblV1HWVs5CV1yV/R1KlkrEqNP/6ECKDTavBm1kpjAPwAB5JHuu 3eXe2rNiRWT/jKMUaEMAA4w03WvOSn4bsUBO1ASjN3dtZldfzwqz4KN88LHhD7BCLt6yEIZZv1h m1VZpUYXUPC4S/E6fvxY0R0cY1D+wGB6xgOGXdAhz8l4OxsO48Y1/p/McGBg6E= X-Google-Smtp-Source: AGHT+IEOZnbfPj4EsUUfAbiMRtL/WF/L9Fpxtj1JRCmNQHx5vY7rM/peQ3KFwSiNKEeuF86ZxSEtMA== X-Received: by 2002:a05:6a00:39a3:b0:728:e2cc:bfd6 with SMTP id d2e1a72fcca58-72abdea9ee1mr70868590b3a.18.1735909529884; Fri, 03 Jan 2025 05:05:29 -0800 (PST) Original-Received: from [192.168.0.234] ([181.228.33.6]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8dba8esm27067639b3a.104.2025.01.03.05.05.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jan 2025 05:05:29 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298274 Archived-At: Al Haji-Ali writes: > On 02/01/2025, Mauro Aranda wrote: > >> Al Haji-Ali writes: >> There's no explicit :value for the group widget, so its value is nil, >> and then the Widget library tries to create all four children with a nil >> value.  The radio-button-choice widget differs from the checklist widget >> in that the former tries to be created with a selected choice, and tries >> harder than the checklist widget, which is fine with a value of nil. >> >> That way, you see that the specified value is obeyed in >> radio-button-choice but not in the checklist widget. >> >> FTR, I'm not saying this is 100% correct.  I'm just trying to explain >> how it works now. > > Thanks, this makes sense. Did I miss an explanation of this issue > somewhere in the docs? I don't think so.  The manual is still missing good explanations. >> This is intended behavior, AFAIU.  The parent can override values for >> the children, and that way we can recreate widgets with new values just >> by changing the values of the parent. > > I was aware of this behaviour for the group, but I didn't twig the > consequence on a checklist. > > I have to say that I find it a bit counter-intuitive. Also the fact > that there is no way to set the value of a checklist without repeating > it in the group is somewhat awkward (certainly it will complicate my > implementation) Note that you don't necessarily need to repeat it in the checklist widget.  In my example, you only need to pass the :value in group: (defun widget-test ()   (let ((items '((item :format "%[One%] " :value 1)                  (item :format "%[Two%] " :value 2)                  (item :format "%[Three%] " :value 3))))     (widget-create      'group      :value '(2 (1 2))      (append '(radio-button-choice                :format "Not inline radio:\n%v\n")              items)      (append '(checklist                :format "Not inline checks:\n%v\n")              items)))   (widget-setup)) When created, radio-button-choice will get its :value set to 2 and checklist will get it set to (1 2). > and a bit inconsistent since setting the value of the > checklist after the group creation would override the value of the > group. A fix, or a some way, that would prevents the group from > overriding the values of the children would be useful, IMO. > With that being said, this issue should probably be closed as "not a bug". I'd like to take some time to study this and see if there's a way to improve the situation.