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: Mon, 6 Jan 2025 12:14:36 -0300 Message-ID: <26f23271-fc07-4967-b589-ea756598330f@gmail.com> References: <94fb0321-f49b-4cbc-84a5-9696f9366cd3@gmail.com> 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="36203"; 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 Mon Jan 06 16:15:09 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 1tUoov-0009Fu-2u for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jan 2025 16:15:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUoor-0001hl-QS; Mon, 06 Jan 2025 10:15:05 -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 1tUoop-0001fq-79 for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 10:15:03 -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 1tUooo-0003PG-TP for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 10:15:02 -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:References:From:MIME-Version:Date:To:Subject; bh=GayUe2XQYrF6yCzoMMY64YQd95/FKmWniNj1ShPJYVI=; b=SwG5Ix5WDNCRvZLJiHBmwF3zqqiC8zgOXk5a8432HzMkP2oexuxg8nUOtzHPyBoG4/lfENE24udqOivVG1DVmx+5Gb5wo1lP4RIR4WsKjQVMhjqdZ6RawFJjqOvDNiymdxjXM9FtRSMQVHWqQfKU+AtryplgDYEwSWTqgL1Bfx5iFiqS/3uLh9zZKvQqgTmGnYPrhcMFXNHq7x4I5T4M7tluBGp5K8clb8clbrrOHIGL7+vm48s0afQGVMSOBtmQteFcpuqwzbi2InQH7YRJl+FyUViDxtES7puexBiKt9LD1nJHtkiYtzMx/XLIhrR5lP1MKQ0oaqo+pfv5iElYEg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUooo-0001oC-FF for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 10:15: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: Mon, 06 Jan 2025 15:15:02 +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.17361764896908 (code B ref 75171); Mon, 06 Jan 2025 15:15:02 +0000 Original-Received: (at 75171) by debbugs.gnu.org; 6 Jan 2025 15:14:49 +0000 Original-Received: from localhost ([127.0.0.1]:39659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUooa-0001nK-Ik for submit@debbugs.gnu.org; Mon, 06 Jan 2025 10:14:49 -0500 Original-Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:42412) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUooY-0001n5-Bl for 75171@debbugs.gnu.org; Mon, 06 Jan 2025 10:14:47 -0500 Original-Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2f4409fc8fdso17930257a91.1 for <75171@debbugs.gnu.org>; Mon, 06 Jan 2025 07:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736176480; x=1736781280; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=GayUe2XQYrF6yCzoMMY64YQd95/FKmWniNj1ShPJYVI=; b=T7+fEVd/yNsCbHqY8J2U//YE5N2LaJvbAQRWOoztVr5FqH52Q2x6bsRnxFKBpf8rET jpklOFqaeFgO9qZDE8rEbyIJTjM0uIrnfsC0DvkKJ0sFfRWLENpJH836gaiWr71fooOu dQ9ei1R0uWLEFGFTq2/Sn37b+dwBfJfbKRtDFTy2zBifsP1An6m/Gnj5Z/ReHSHZU7q4 OM//SQyYoDwhrXanhg/pVyHdttKN2OLMCSMdZ4AOGi+xbEXM6Dn7mCNdlhRLLqvjoGuO U6gC9K887t9QxMnpDdHBT4Tm64dmlPi+fup4qrKZO27ftYpO1YvdqOcWkYR4OULXiwT5 iAMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736176480; x=1736781280; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GayUe2XQYrF6yCzoMMY64YQd95/FKmWniNj1ShPJYVI=; b=qC78hnH0mi+deSShw0wGwVqo0K6YYWqMXdx2epvdeV9f/we0A8AttHEHzuMo81vqRh wGPkC1t7xwSDGTeDGps0SzTBgoQW3sUQm4aoqmhGt66hQwPjVVvHj9BK82KXDjGaLUw+ WpXz64ZvwgtmvCvN1ZrXZV1Ov8bUx8wBx7JI3oGTt85LwyoUuWOXnouf1Y7rEhdVkm9n wKpSfkKVurmRbv2RMuSM3UQd4MTCY2aPh7/68dHMT1P5DMmIfOm7oR5ivBzXj6fTBFBQ TlncraUCTss2uJPi5PS0S6WCfJMgXgRyzVdGnFWvF/CABNNmeqD2ExTxhfVUn7CBqYxz Jgng== X-Forwarded-Encrypted: i=1; AJvYcCXiMgBPnJRLqUm+zXsjWmM32I2sF4y646ha9PQ6OgMLJTJDkgpQz56y5TJ8UtxkTJt4D2Phvw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwWQtp9AQ+cv3pHazPexgKkyf/vh0cDdmmQw4o5k78/Eug1VH7y 9FQT3nuF7nedTJNZ/sxarPPiBtGxgPFZ7bQhY4DDTKrPGXH0hW60 X-Gm-Gg: ASbGnctsrfL4KYf6J7/MPfonu6fSjjoO0SHpsFGAgAKO6mVhLlkzj2gx+NOfvx3YXAv DPWMkdMFzYGNjZLWBAEiSC7Xo3AUqxC/iiXhLVi86HqG6IjNgYDGX9qLo2C1p0dV2wMES8Vdnke QA2SLBhcsyZIiBiuCrF3g8K1zjASjokOVZ9VSKp2Z4FE8Kn3G4mDpCDQzRuE6Y29nRkC+SfCeJT K+v2NQWIjTnmuewRw03Pk6hHZ8sTnaVm265MA45iPUFxC+ZoUXzuR/AP2XDlGY= X-Google-Smtp-Source: AGHT+IHwPpuq7qhaYMWzdZyGcG+c7U55kn5WkTzh3O4zUKhWA73/sAXCSBsR1IPuO3g0LXG2Q17Uxg== X-Received: by 2002:a17:90b:2651:b0:2ef:2980:4411 with SMTP id 98e67ed59e1d1-2f443607d7cmr93364378a91.9.1736176480119; Mon, 06 Jan 2025 07:14:40 -0800 (PST) Original-Received: from [192.168.0.234] ([181.228.33.6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f4477c8537sm33844586a91.21.2025.01.06.07.14.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jan 2025 07:14:39 -0800 (PST) Content-Language: en-US In-Reply-To: <94fb0321-f49b-4cbc-84a5-9696f9366cd3@gmail.com> 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:298674 Archived-At: Mauro Aranda writes: > Al Haji-Ali writes: > >> On 02/01/2025, Mauro Aranda wrote: >> >>> Al Haji-Ali writes: >>> 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. Making the group widget create its children with their default values is easy, by testing if it has a explicit nil value or not. But since it has worked this way forever, I wouldn't suggest changing it. I think that specifying the :value in the group widget is the way that the group widget it's supposed to work. There are ways to derive a widget from it that doesn't enforce it, so I'm inclined to mark this as notabug.