From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Al Haji-Ali Newsgroups: gmane.emacs.bugs Subject: bug#75171: 30.0.50; Checklist widget inside a group does not initialize correctly Date: Sun, 29 Dec 2024 08:33:44 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21295"; mail-complaints-to="usenet@ciao.gmane.io" To: 75171@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 29 09:41:24 2024 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 1tRorU-0005Ow-GB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Dec 2024 09:41:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRorB-0004CI-P8; Sun, 29 Dec 2024 03:41: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 1tRorA-0004Bu-2L for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 03:41:04 -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 1tRor9-0008I3-Q7 for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 03:41:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=b4zeEQXVCzkvWz/SseKp29X1ePr6Wdon64nBkrtLmN4=; b=g3q5ikLUMGqM6ZbuvbeYRAsFBjCvCCPmAO3ilPdjAbb7pRAUozqsCamNczWUlLqMI9ZQCPh/zDDL4CkcCHuTbTVRqlVPw1KUA821m0yFiLLwOfOhsSD2f2qGf5xKAK8XKA2XKdksGMii3AtCaQRHdngpjSWsKyOIhWK1VIpN9iCHRxn1lQ38+2L2oE+6NOMj2GGWynEc8Tj7QlPZOcr84zw3VytzYI2Hn71Sz07gCBmEVpXZajshaBGm4/BbmwvU95m+yAZdiuHnuNxc1RugFz892thUDKpce/i6qazG0McH2RwSu4ZRlSGJ2Hx22AWIrZSqPiImKnBBkL3vro7KoA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRor8-0002oc-KQ for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 03:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Al Haji-Ali Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Dec 2024 08:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75171 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173546161110451 (code B ref -1); Sun, 29 Dec 2024 08:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Dec 2024 08:40:11 +0000 Original-Received: from localhost ([127.0.0.1]:53698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRoqJ-0002iH-5e for submit@debbugs.gnu.org; Sun, 29 Dec 2024 03:40:11 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:44498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRoqF-0002hJ-Qf for submit@debbugs.gnu.org; Sun, 29 Dec 2024 03:40:09 -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 1tRoqF-00044j-FW for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 03:40:07 -0500 Original-Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRoqD-00087h-Ly for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 03:40:07 -0500 Original-Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4361f65ca01so83873835e9.1 for ; Sun, 29 Dec 2024 00:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735461603; x=1736066403; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=b4zeEQXVCzkvWz/SseKp29X1ePr6Wdon64nBkrtLmN4=; b=SJNkteq7JObujILZVbNzEfuS24sJPjPxqxbCEJSTwmrtsLwkVZxRuinffHF77COe1/ txLrvxuT+ct//EqLpDyxW67oYaNJ4l01U57jhI08Ne23cpXiEQkaGXD3I0WJkq9xZMVM ZlZFYEZjOkvdKQFLJMNmSeSmjBKR6VWYp5XxSaYQ/fQJnys/yNjUxR4m/s7l8Wkafq04 3lKxn+wd/wd3qvL5C61UgUZsOxjnxaAZ70R2iiX0XqZLXG58PrkOwaxzAuVsnTP/NYKz IlvsUbSgub5MDfn/RIhODai1R5lzhLpFOB4SIRaG4nIprcDNVvuIbZ5h/HuS1wcdh/35 4phA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735461603; x=1736066403; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=b4zeEQXVCzkvWz/SseKp29X1ePr6Wdon64nBkrtLmN4=; b=auaBogM40ulBiGPXd+zADGbmNEhzitOzK4m/TbuyFuLcCkE8+U+MFIkCAN4tho0GgN zI7AMwG8pH8juKcNfoFPa6gaZ1w2T2PvS3fdbDwBZ88El+eOAW5XDvjS/UoBBC7ShicY uwpkz7B4vbRhd5ABFS8Iq1tXBXXImgAi7RrOKm49F0rYnLWzldi4koeBPyNOI9gff6wR PrKaabPIaDocNdBVKaJE+yAbKd8Zlm+SaF86I1P44H+sJUXfNFnzN49+7jWEFeYMVh13 TIMpsgz1yTPIN9Gx20jwwP5uzCiwE3BzsgziaqrO8IWsBtpyFuZZMmAj+EC4+BNzipyB eVog== X-Gm-Message-State: AOJu0YzVfseX98N3jUQfcgIYj24bE1boc0ZUX0MRrZH/T0F2NLMXFeQE 9/J2SutpP3Jkjx3bAYC0LUibWwAhKZBCvKrHv3rSPKdFDXvHW35Ybz+nnKcX X-Gm-Gg: ASbGncsBpizDsd3acYOGaGGHkAExo4Qy2oFu1IoluUPL+biBPLJUyF+V7BSwpSgqbb/ BqrGBL8LG+bLWlx1xyrcxju/IFp4lKSWgUILEt/cMTSsGzYFqVXL73Stvi48Hh8b2lkCGX4ci6D NoWCX6WAVuFrbWw+ZVccoUChhyPldVI9x8CPabyKYo3c/REVmG1ML3oQI5DvsU7LysMD5pujYYO iAG4X+yfauD71qi5WfZOAR/BOuHuttWmlZjQDThj+grjKWANSCbvn+gYLK4XgWjvrAvYj15Nhzo oInkn00MZ2DqY+B/VUQiHYyDxPBkX0CIg6ke1AXLA3vkqnR69rw4d3GI4qzqzw== X-Google-Smtp-Source: AGHT+IEmtwaX28fllpIi+icQMY21vyqxiskz6iuvfSZjYlHRXtl4LLxCHKPFalKtP0kqwsPKzFxXtA== X-Received: by 2002:a5d:47af:0:b0:385:f10a:335 with SMTP id ffacd0b85a97d-38a221face5mr25465251f8f.21.1735461602652; Sun, 29 Dec 2024 00:40:02 -0800 (PST) Original-Received: from localhost (sgyl-45-b2-v4wan-166941-cust3717.vm6.cable.virginm.net. [82.37.190.134]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c828f5fsm27188338f8f.8.2024.12.29.00.40.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 00:40:02 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=abdo.haji.ali@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:297938 Archived-At: The following function creates four widgets (two radio button lists and two checklists) inside a group. All lists have an initial value, while the group has a nil value. Strangely, the radio buttons get initialized correctly (selecting the correct button based on their value), but the checkboxes do not (all boxes are unchecked regardless of the value). Removing the group results in correct initialization. --8<---------------cut here---------------start------------->8--- (defun widget-test () (let ((items '((item :format "%[One%] " :value 1) (item :format "%[Two%] " :value 2) (item :format "%[Three%] " :value 3)))) (widget-create 'group (append '(radio-button-choice :inline t :format "Inline radio:\n%v\n" :value 2) items) (append '(radio-button-choice :format "Not inline radio:\n%v\n" :value 2) items) (append '(checklist :inline t :format "Inline checks:\n%v\n" :value (1 2)) items) (append '(checklist :format "Not inline checks:\n%v\n" :value (1 2)) items))) (widget-setup)) --8<---------------cut here---------------end--------------->8--- If this is unintended behaviour, I managed to fix the inline version of the checklists with this advice --8<---------------cut here---------------start------------->8--- (advice-add 'widget-checklist-match-inline :around (lambda (old-fn wid val) (when val (funcall old-fn wid val)))) --8<---------------cut here---------------end--------------->8--- The non-inline version probably requires a fix in `widget-checklist-match`, but I can't make out the logic in this function (it seems to return non-nil when not matching?!). If it is intended behaviour, how can I correctly set the value of a checklist? and why is there a discrepancy between radio buttons and check lists? -- Al