From unknown Tue Jun 17 01:44:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76664: 31.0.50; behavior of widget-put implemented in Lisp changed compared to C Resent-From: David Ponce Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Mar 2025 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76664 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 76664@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174084953914067 (code B ref -1); Sat, 01 Mar 2025 17:19:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Mar 2025 17:18:59 +0000 Received: from localhost ([127.0.0.1]:42648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1toQUM-0003en-Dw for submit@debbugs.gnu.org; Sat, 01 Mar 2025 12:18:58 -0500 Received: from lists.gnu.org ([2001:470:142::17]:56892) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1toQUJ-0003eD-OC for submit@debbugs.gnu.org; Sat, 01 Mar 2025 12:18:57 -0500 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 1toQUA-0001nh-PM for bug-gnu-emacs@gnu.org; Sat, 01 Mar 2025 12:18:49 -0500 Received: from smtp-70.smtpout.orange.fr ([80.12.242.70] helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.2:RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1toQU7-00082r-Gs for bug-gnu-emacs@gnu.org; Sat, 01 Mar 2025 12:18:46 -0500 Received: from [192.168.1.21] ([90.112.40.65]) by smtp.orange.fr with ESMTPA id oQTztSgyzmF02oQU2tUai1; Sat, 01 Mar 2025 18:18:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1740849519; bh=s/Pf07LEHMJ5dj+SyV+t5kv2lezwPvDVJNrtRKSH0+c=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=LAAIWVYoT3T2SZdIoGxwDc/tQQHjuUFsS5sfZftxMlZB0xO9T5hsiNBd0NSGIzJF1 Kbwm86HDX0KTn8SWX1cND0GJmmdcpHG60DoMbUzLdDBeAX0WDj2LAYIwSAYaOuTz9Y 5LnMXQocszTTt32cJC1OFi2OKmI98/hGfN4tX5khj0zsjGtm4cQApDqaMJF0byZoyN dr8JlnLvQKk6YwAyp1convBAT8gHUe5jt5Us9GWZtDnQeDzQ8rCyjKU40hOG1DhbB+ 0hcmVT66axAqDJiLWplI1bCIpj4TL3IQy4306hLtGSm/KuUhTSpwcFx8vj0indrlIv zB1N15ye3jg8A== X-ME-Helo: [192.168.1.21] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sat, 01 Mar 2025 18:18:39 +0100 X-ME-IP: 90.112.40.65 Message-ID: <80c43471-6d8c-4466-841a-6dde149eeb92@orange.fr> Date: Sat, 1 Mar 2025 18:18:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: fr, en-US From: David Ponce Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=80.12.242.70; envelope-from=da_vid@orange.fr; helo=smtp.smtpout.orange.fr 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Since this commit: author Stefan Kangas Fri, 28 Feb 2025 18:28:58 +0100 (18:28 +0100) commit 8b659313b83c82cfe09af1638289fccdfc9af23d Lift widget functions from C to Lisp I encounter errors in widgets because the behavior of the Lisp implementation of `widget-put' changed compared to the C version. Specifically the C version used to return the passed value, which is no more the case of the Lisp version. This trivial patch fixed the issue for me: diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index d6fd1156123..ff6550e852f 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -625,7 +625,8 @@ widgetp (defun widget-put (widget property value) "In WIDGET, set PROPERTY to VALUE. The value can later be retrieved with `widget-get'." - (setcdr widget (plist-put (cdr widget) property value))) + (setcdr widget (plist-put (cdr widget) property value)) + value) ;;;###autoload (defun widget-get (widget property) Thanks In GNU Emacs 31.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) of 2025-03-01 Repository revision: 6a2f6056c5a079a7f3db240171680560a3bd9710 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 40 (KDE Plasma) Configured using: 'configure --prefix=/home/dponce --with-native-compilation=no PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB Important settings: value of $LC_TIME: fr_FR.utf8 value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix From unknown Tue Jun 17 01:44:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: David Ponce Subject: bug#76664: closed (Re: bug#76664: 31.0.50; behavior of widget-put implemented in Lisp changed compared to C) Message-ID: References: <80c43471-6d8c-4466-841a-6dde149eeb92@orange.fr> X-Gnu-PR-Message: they-closed 76664 X-Gnu-PR-Package: emacs Reply-To: 76664@debbugs.gnu.org Date: Sun, 02 Mar 2025 01:22:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1740878522-23796-1" This is a multi-part message in MIME format... ------------=_1740878522-23796-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #76664: 31.0.50; behavior of widget-put implemented in Lisp changed compare= d to C which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 76664@debbugs.gnu.org. --=20 76664: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76664 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1740878522-23796-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 76664-done) by debbugs.gnu.org; 2 Mar 2025 01:21:15 +0000 Received: from localhost ([127.0.0.1]:47632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1toY14-000685-QO for submit@debbugs.gnu.org; Sat, 01 Mar 2025 20:21:15 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:54382) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1toY10-00067I-Il for 76664-done@debbugs.gnu.org; Sat, 01 Mar 2025 20:21:13 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5e51e3274f1so1504174a12.0 for <76664-done@debbugs.gnu.org>; Sat, 01 Mar 2025 17:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740878464; x=1741483264; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=efa7KR65KUGrUAeIWpTp8gPAfVBTIZ2RA/G6limDVZc=; b=lXv7QY8IfUspdD6K17HXinxoDrkeAf1lHz5M7pXX8DUf37fh5znH74FFsIPFmAZ3Ef XCcMk6QOsyBRprRUy0bIfK6/6eofga47l1HgTkrCHsPnVO592akXjEZ2pT6ybf5Ll0oO 9cg5HcSImBnKIj4sVw0qHyuvG8aQmSuxeF9gN2Nuf9nMvM82PSQzS1w/P8uDztoyWABO 0JfcxfdNf9rRsQreVDlgEw9Pod9zbsZ5qIsYk5Mr5ZIeOJDaxTYjBl8cWwA+xH03ZUr+ lg1CaMid79JVLp97X2N3YcmDRbHZr1uh3kAPlu/zjL+/QNDqO99Mw3aoNX9zxdr/o25m m78g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740878464; x=1741483264; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=efa7KR65KUGrUAeIWpTp8gPAfVBTIZ2RA/G6limDVZc=; b=PFRoP0cxw5sr/GEYAmw6hezSclFAsDIJskGYaFKAKHxQWbhvxketg5PJR1O1kVb9e3 zDxFWcv9TCcCfwrqA3Oc40UocOrpIIDzaq1D6J5DdwE72AlUryFkZ7+qA4hOElfF9zOa i3wyo0/jTZVhkt3elwV1DqkYyCaIE0MsEug/AMv748/cc/FMRpwcZj9iMBibTm1VZOXU kJfecXhprVxwI0+aZ3iNjRmEX20VNUOytKgYM0sOyiBe3xoFYELzUctlh8bhYgmmnd7i N8gwuKrjR/krnZZlSP69NcetJXotx/ATNIMGxufZMwbdeXIGoZbqDf1amgTo0NVRSECL 5JxA== X-Forwarded-Encrypted: i=1; AJvYcCXlnLbSuTHA92SUHh/AeVTNAdVXQstGJwF5VmfWBGWRm2TscPN4rB95YVr33LT4fNAf4JN6FHRTrDVY@debbugs.gnu.org X-Gm-Message-State: AOJu0YyWpA5BQku16L2gGSf0tR3wq9NmwhadAC/WbkuzcBJdEaug/yj0 5NoCYJXyKOUyR9c4zCbeuTr2RemzkTgTtT5hh3l8aDzXaUBJ7rcNoqXSScRGiFlivrXRZXfJ00X Oh8MOnMfD00NuA7c78XJqcZUPp+8jak6jCy4= X-Gm-Gg: ASbGncumbIApKAhYaqNkGjSH1EnCRE4HGB5OZkTHvynkORcYteoq9jzJiVuEguKQR/7 FkpG4AW43epgTLp1nzfmbebE29DKGhjZCdUZhXCGhYCwzSfSJw94AWYWmAiTuQ4+R+TEzzWtouJ UbW1DfGjarirsgFy7WjuD3PInAWQ== X-Google-Smtp-Source: AGHT+IF+sgOpLLRsr6l2Mb0NkNH9XE3mMB1ve6RzF44zCzs7uZNsxqrigwAnTMVxnu+HjiZG7+JkeAjpQaupW9xmJZ4= X-Received: by 2002:a05:6402:50d0:b0:5e5:3610:8b7a with SMTP id 4fb4d7f45d1cf-5e5361091f8mr2386246a12.17.1740878464223; Sat, 01 Mar 2025 17:21:04 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 1 Mar 2025 17:21:03 -0800 From: Stefan Kangas In-Reply-To: <80c43471-6d8c-4466-841a-6dde149eeb92@orange.fr> References: <80c43471-6d8c-4466-841a-6dde149eeb92@orange.fr> MIME-Version: 1.0 Date: Sat, 1 Mar 2025 17:21:03 -0800 X-Gm-Features: AQ5f1JrvqpJYUbydJcDAWJt4xaw_h_gB7hyalcj3HqvurNP5bBE46gL9buCzm3I Message-ID: Subject: Re: bug#76664: 31.0.50; behavior of widget-put implemented in Lisp changed compared to C To: David Ponce , 76664-done@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76664-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Version: 30.1 David Ponce via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Since this commit: > > author Stefan Kangas > Fri, 28 Feb 2025 18:28:58 +0100 (18:28 +0100) > commit 8b659313b83c82cfe09af1638289fccdfc9af23d > > Lift widget functions from C to Lisp > > I encounter errors in widgets because the behavior of the Lisp > implementation of `widget-put' changed compared to the C version. > > Specifically the C version used to return the passed value, which > is no more the case of the Lisp version. > > This trivial patch fixed the issue for me: Thanks, I pushed the below change to master in your name. I also separately added a unit test for this. I'm therefore closing this bug report. > diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el > index d6fd1156123..ff6550e852f 100644 > --- a/lisp/wid-edit.el > +++ b/lisp/wid-edit.el > @@ -625,7 +625,8 @@ widgetp > (defun widget-put (widget property value) > "In WIDGET, set PROPERTY to VALUE. > The value can later be retrieved with `widget-get'." > - (setcdr widget (plist-put (cdr widget) property value))) > + (setcdr widget (plist-put (cdr widget) property value)) > + value) > > ;;;###autoload > (defun widget-get (widget property) ------------=_1740878522-23796-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 1 Mar 2025 17:18:59 +0000 Received: from localhost ([127.0.0.1]:42648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1toQUM-0003en-Dw for submit@debbugs.gnu.org; Sat, 01 Mar 2025 12:18:58 -0500 Received: from lists.gnu.org ([2001:470:142::17]:56892) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1toQUJ-0003eD-OC for submit@debbugs.gnu.org; Sat, 01 Mar 2025 12:18:57 -0500 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 1toQUA-0001nh-PM for bug-gnu-emacs@gnu.org; Sat, 01 Mar 2025 12:18:49 -0500 Received: from smtp-70.smtpout.orange.fr ([80.12.242.70] helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.2:RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1toQU7-00082r-Gs for bug-gnu-emacs@gnu.org; Sat, 01 Mar 2025 12:18:46 -0500 Received: from [192.168.1.21] ([90.112.40.65]) by smtp.orange.fr with ESMTPA id oQTztSgyzmF02oQU2tUai1; Sat, 01 Mar 2025 18:18:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1740849519; bh=s/Pf07LEHMJ5dj+SyV+t5kv2lezwPvDVJNrtRKSH0+c=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=LAAIWVYoT3T2SZdIoGxwDc/tQQHjuUFsS5sfZftxMlZB0xO9T5hsiNBd0NSGIzJF1 Kbwm86HDX0KTn8SWX1cND0GJmmdcpHG60DoMbUzLdDBeAX0WDj2LAYIwSAYaOuTz9Y 5LnMXQocszTTt32cJC1OFi2OKmI98/hGfN4tX5khj0zsjGtm4cQApDqaMJF0byZoyN dr8JlnLvQKk6YwAyp1convBAT8gHUe5jt5Us9GWZtDnQeDzQ8rCyjKU40hOG1DhbB+ 0hcmVT66axAqDJiLWplI1bCIpj4TL3IQy4306hLtGSm/KuUhTSpwcFx8vj0indrlIv zB1N15ye3jg8A== X-ME-Helo: [192.168.1.21] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sat, 01 Mar 2025 18:18:39 +0100 X-ME-IP: 90.112.40.65 Message-ID: <80c43471-6d8c-4466-841a-6dde149eeb92@orange.fr> Date: Sat, 1 Mar 2025 18:18:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: fr, en-US To: bug-gnu-emacs@gnu.org From: David Ponce Subject: 31.0.50; behavior of widget-put implemented in Lisp changed compared to C Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=80.12.242.70; envelope-from=da_vid@orange.fr; helo=smtp.smtpout.orange.fr 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Since this commit: author Stefan Kangas Fri, 28 Feb 2025 18:28:58 +0100 (18:28 +0100) commit 8b659313b83c82cfe09af1638289fccdfc9af23d Lift widget functions from C to Lisp I encounter errors in widgets because the behavior of the Lisp implementation of `widget-put' changed compared to the C version. Specifically the C version used to return the passed value, which is no more the case of the Lisp version. This trivial patch fixed the issue for me: diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index d6fd1156123..ff6550e852f 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -625,7 +625,8 @@ widgetp (defun widget-put (widget property value) "In WIDGET, set PROPERTY to VALUE. The value can later be retrieved with `widget-get'." - (setcdr widget (plist-put (cdr widget) property value))) + (setcdr widget (plist-put (cdr widget) property value)) + value) ;;;###autoload (defun widget-get (widget property) Thanks In GNU Emacs 31.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) of 2025-03-01 Repository revision: 6a2f6056c5a079a7f3db240171680560a3bd9710 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 40 (KDE Plasma) Configured using: 'configure --prefix=/home/dponce --with-native-compilation=no PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB Important settings: value of $LC_TIME: fr_FR.utf8 value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix ------------=_1740878522-23796-1--