GNU bug report logs -
#76664
31.0.50; behavior of widget-put implemented in Lisp changed compared to C
Previous Next
Reported by: David Ponce <da_vid <at> orange.fr>
Date: Sat, 1 Mar 2025 17:19:02 UTC
Severity: normal
Found in version 31.0.50
Fixed in version 30.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76664 in the body.
You can then email your comments to 76664 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76664
; Package
emacs
.
(Sat, 01 Mar 2025 17:19:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
David Ponce <da_vid <at> orange.fr>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 01 Mar 2025 17:19:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
Since this commit:
author Stefan Kangas <stefankangas <at> gmail.com>
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
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Sun, 02 Mar 2025 01:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
David Ponce <da_vid <at> orange.fr>
:
bug acknowledged by developer.
(Sun, 02 Mar 2025 01:22:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 76664-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
David Ponce via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:
> Since this commit:
>
> author Stefan Kangas <stefankangas <at> gmail.com>
> 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)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 30 Mar 2025 11:24:31 GMT)
Full text and
rfc822 format available.
This bug report was last modified 77 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.