Package: emacs;
Reported by: marco.antoniotti <at> unimib.it
Date: Sun, 11 Feb 2024 11:59:01 UTC
Severity: normal
Found in version 29.2
Done: Eli Zaretskii <eliz <at> gnu.org>
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 69049 in the body.
You can then email your comments to 69049 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-gnu-emacs <at> gnu.org
:bug#69049
; Package emacs
.
(Sun, 11 Feb 2024 11:59:01 GMT) Full text and rfc822 format available.marco.antoniotti <at> unimib.it
:bug-gnu-emacs <at> gnu.org
.
(Sun, 11 Feb 2024 11:59:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Marco Antoniotti <marco.antoniotti <at> unimib.it> To: bug-gnu-emacs <at> gnu.org Subject: 29.2; Buglet in `read-from-string' (and, likely, `read') with defstructs. Date: Sun, 11 Feb 2024 12:41:43 +0100
Hi Here is the problem. This is in IELM. ELISP> (cl-defstruct foo (msg "bar")) foo ELISP> (make-foo) #s(foo :msg "bar") ELISP> (make-foo :msg "baz") #s(foo :msg "baz") ELISP> (read-from-string "#s(foo :msg \"baz\")") (#s(foo :msg :msg) . 18) As you see, the structure is not read in correctly. All the best Marco Antoniotti In GNU Emacs 29.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G9323)) of 2024-01-18 built on builder10-14.lan Windowing system distributor 'Apple', version 10.3.2487 System Description: macOS 14.3.1 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no' Configured features: ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: IELM Minor modes in effect: shell-dirtrack-mode: t comint-fontify-input-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t column-number-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /Users/marcoxa/.emacs.d/elpa/jsonrpc-1.0.24/jsonrpc hides /Applications/Emacs.app/Contents/Resources/lisp/jsonrpc /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-jump hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-jump /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-ensure hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-ensure /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-core hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-core /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-delight hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-delight /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-diminish hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-diminish /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-bind-key hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-bind-key /Users/marcoxa/.emacs.d/elpa/bind-key-20230203.2004/bind-key hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/bind-key /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-lint hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-lint /Users/marcoxa/.emacs.d/elpa/project-0.10.0/project hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/project /Users/marcoxa/.emacs.d/elpa/eglot-1.17/eglot hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/eglot /Users/marcoxa/.emacs.d/elpa/eldoc-1.15.0/eldoc hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/eldoc Features: (shadow sort mail-extr emacsbug message yank-media puny rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils shell pcomplete thingatpt files-x grep help-fns radix-tree inspector cl-print edebug debug backtrace find-func misearch multi-isearch ielm pp pcase compile text-property-search comint ansi-osc ansi-color ring magicel dired-aux dired dired-loaddefs time-date wheatgrass-theme iron-main pl1-mode hlasm-mode jcl-poly-mode use-package-ensure use-package-core polymode poly-lock polymode-base polymode-weave polymode-export polymode-compat advice polymode-methods polymode-core format-spec polymode-classes eieio-custom eieio-base color jcl-mode iron-main-mode easy-mmode iron-main-epf derived iron-main-hercules-cmds iron-main-jcl-templates cl-extra help-mode iron-main-utils iron-main-session iron-main-ruler-function iron-main-widgets iron-main-vars wid-edit desktop frameset ruler-mode sgml-mode facemenu dom erlang-start fortress-mode scala-mode-auto finder-inf ada-mode-autoloads ada-ref-man-autoloads auctex-autoloads tex-site auto-complete-autoloads cmake-font-lock-autoloads cmake-ide-autoloads cmake-mode-autoloads cmake-project-autoloads csv-mode-autoloads eglot-autoloads eldoc-autoloads ess-autoloads evil-autoloads flycheck-autoloads gnat-compiler-autoloads haskell-mode-autoloads inspector-autoloads jsonrpc-autoloads julia-mode-autoloads julia-repl-autoloads julia-vterm-autoloads levenshtein-autoloads markdown-mode-autoloads mimetypes-autoloads popup-autoloads project-autoloads rust-mode-autoloads slime-repl-ansi-color-autoloads slime-autoloads macrostep-autoloads slime-theme-autoloads sml-basis-autoloads mode-icons-autoloads toml-autoloads toml-mode-autoloads treemacs-all-the-icons-autoloads all-the-icons-autoloads treemacs-tab-bar-autoloads treemacs-autoloads cfrs-autoloads posframe-autoloads ht-autoloads hydra-autoloads lv-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads dash-autoloads tuareg-autoloads rx caml-autoloads uniquify-files-autoloads vterm-autoloads info wisi-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 301666 14568) (symbols 48 15035 0) (strings 32 52828 3003) (string-bytes 1 1630319) (vectors 16 27760) (vector-slots 8 373494 19019) (floats 8 155 266) (intervals 56 13475 301) (buffers 984 22))
bug-gnu-emacs <at> gnu.org
:bug#69049
; Package emacs
.
(Sun, 11 Feb 2024 12:55:02 GMT) Full text and rfc822 format available.Message #8 received at 69049 <at> debbugs.gnu.org (full text, mbox):
From: Philip Kaludercic <philipk <at> posteo.net> To: Marco Antoniotti <marco.antoniotti <at> unimib.it> Cc: 69049 <at> debbugs.gnu.org Subject: Re: bug#69049: 29.2; Buglet in `read-from-string' (and, likely, `read') with defstructs. Date: Sun, 11 Feb 2024 12:37:08 +0000
Marco Antoniotti <marco.antoniotti <at> unimib.it> writes: > Hi > > Here is the problem. This is in IELM. > > ELISP> (cl-defstruct foo (msg "bar")) > foo > ELISP> (make-foo) > #s(foo :msg "bar") > > ELISP> (make-foo :msg "baz") > #s(foo :msg "baz") > > ELISP> (read-from-string "#s(foo :msg \"baz\")") > (#s(foo :msg :msg) > . 18) FWIW on Emacs 30.0.50 I get (read-from-string "#s(foo :msg \"baz\")") ;=> (#s(foo :msg "baz") . 18) > As you see, the structure is not read in correctly. > > All the best > > Marco Antoniotti > > > > > > > > > In GNU Emacs 29.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 > Version 10.14.6 (Build 18G9323)) of 2024-01-18 built on > builder10-14.lan > Windowing system distributor 'Apple', version 10.3.2487 > System Description: macOS 14.3.1 > > Configured using: > 'configure --with-ns '--enable-locallisppath=/Library/Application > Support/Emacs/${version}/site-lisp:/Library/Application > Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000 > -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no' > > Configured features: > ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER > PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB > > Important settings: > value of $LANG: en_US.UTF-8 > locale-coding-system: utf-8-unix > > Major mode: IELM > > Minor modes in effect: > shell-dirtrack-mode: t > comint-fontify-input-mode: t > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > column-number-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > > Load-path shadows: > /Users/marcoxa/.emacs.d/elpa/jsonrpc-1.0.24/jsonrpc hides /Applications/Emacs.app/Contents/Resources/lisp/jsonrpc > /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-jump hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-jump > /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-ensure hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-ensure > /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-core hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-core > /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-delight hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-delight > /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-diminish hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-diminish > /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package > /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-bind-key hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-bind-key > /Users/marcoxa/.emacs.d/elpa/bind-key-20230203.2004/bind-key hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/bind-key > /Users/marcoxa/.emacs.d/elpa/use-package-20230426.2324/use-package-lint hides /Applications/Emacs.app/Contents/Resources/lisp/use-package/use-package-lint > /Users/marcoxa/.emacs.d/elpa/project-0.10.0/project hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/project > /Users/marcoxa/.emacs.d/elpa/eglot-1.17/eglot hides /Applications/Emacs.app/Contents/Resources/lisp/progmodes/eglot > /Users/marcoxa/.emacs.d/elpa/eldoc-1.15.0/eldoc hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/eldoc > > Features: > (shadow sort mail-extr emacsbug message yank-media puny rfc822 mml > mml-sec epa epg rfc6068 epg-config gnus-util mm-decode mm-bodies > mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail > rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils shell pcomplete > thingatpt files-x grep help-fns radix-tree inspector cl-print edebug > debug backtrace find-func misearch multi-isearch ielm pp pcase compile > text-property-search comint ansi-osc ansi-color ring magicel dired-aux > dired dired-loaddefs time-date wheatgrass-theme iron-main pl1-mode > hlasm-mode jcl-poly-mode use-package-ensure use-package-core polymode > poly-lock polymode-base polymode-weave polymode-export polymode-compat > advice polymode-methods polymode-core format-spec polymode-classes > eieio-custom eieio-base color jcl-mode iron-main-mode easy-mmode > iron-main-epf derived iron-main-hercules-cmds iron-main-jcl-templates > cl-extra help-mode iron-main-utils iron-main-session > iron-main-ruler-function iron-main-widgets iron-main-vars wid-edit > desktop frameset ruler-mode sgml-mode facemenu dom erlang-start > fortress-mode scala-mode-auto finder-inf ada-mode-autoloads > ada-ref-man-autoloads auctex-autoloads tex-site auto-complete-autoloads > cmake-font-lock-autoloads cmake-ide-autoloads cmake-mode-autoloads > cmake-project-autoloads csv-mode-autoloads eglot-autoloads > eldoc-autoloads ess-autoloads evil-autoloads flycheck-autoloads > gnat-compiler-autoloads haskell-mode-autoloads inspector-autoloads > jsonrpc-autoloads julia-mode-autoloads julia-repl-autoloads > julia-vterm-autoloads levenshtein-autoloads markdown-mode-autoloads > mimetypes-autoloads popup-autoloads project-autoloads > rust-mode-autoloads slime-repl-ansi-color-autoloads slime-autoloads > macrostep-autoloads slime-theme-autoloads sml-basis-autoloads > mode-icons-autoloads toml-autoloads toml-mode-autoloads > treemacs-all-the-icons-autoloads all-the-icons-autoloads > treemacs-tab-bar-autoloads treemacs-autoloads cfrs-autoloads > posframe-autoloads ht-autoloads hydra-autoloads lv-autoloads > pfuture-autoloads ace-window-autoloads avy-autoloads dash-autoloads > tuareg-autoloads rx caml-autoloads uniquify-files-autoloads > vterm-autoloads info wisi-autoloads package browse-url url url-proxy > url-privacy url-expand url-methods url-history url-cookie > generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse > auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x > map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc > iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook > vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win > ucs-normalize mule-util term/common-win tool-bar dnd fontset image > regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode > prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu > timer select scroll-bar mouse jit-lock font-lock syntax font-core > term/tty-colors frame minibuffer nadvice seq simple cl-generic > indonesian philippine cham georgian utf-8-lang misc-lang vietnamese > tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek > romanian slovak czech european ethiopic indian cyrillic chinese > composite emoji-zwj charscript charprop case-table epa-hook > jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs > theme-loaddefs faces cus-face macroexp files window text-properties > overlay sha1 md5 base64 format env code-pages mule custom widget keymap > hashtable-print-readable backquote threads kqueue cocoa ns multi-tty > make-network-process emacs) > > Memory information: > ((conses 16 301666 14568) > (symbols 48 15035 0) > (strings 32 52828 3003) > (string-bytes 1 1630319) > (vectors 16 27760) > (vector-slots 8 373494 19019) > (floats 8 155 266) > (intervals 56 13475 301) > (buffers 984 22)) > > > > -- Philip Kaludercic
bug-gnu-emacs <at> gnu.org
:bug#69049
; Package emacs
.
(Sun, 11 Feb 2024 13:28:02 GMT) Full text and rfc822 format available.Message #11 received at 69049 <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Philip Kaludercic <philipk <at> posteo.net> Cc: marco.antoniotti <at> unimib.it, 69049 <at> debbugs.gnu.org Subject: Re: bug#69049: 29.2; Buglet in `read-from-string' (and, likely, `read') with defstructs. Date: Sun, 11 Feb 2024 15:26:50 +0200
> Cc: 69049 <at> debbugs.gnu.org > From: Philip Kaludercic <philipk <at> posteo.net> > Date: Sun, 11 Feb 2024 12:37:08 +0000 > > Marco Antoniotti <marco.antoniotti <at> unimib.it> writes: > > > Hi > > > > Here is the problem. This is in IELM. > > > > ELISP> (cl-defstruct foo (msg "bar")) > > foo > > ELISP> (make-foo) > > #s(foo :msg "bar") > > > > ELISP> (make-foo :msg "baz") > > #s(foo :msg "baz") > > > > ELISP> (read-from-string "#s(foo :msg \"baz\")") > > (#s(foo :msg :msg) > > . 18) > > FWIW on Emacs 30.0.50 I get > > (read-from-string "#s(foo :msg \"baz\")") ;=> (#s(foo :msg "baz") . 18) The doc string of read-from-string says: read-from-string is a built-in function in ‘src/lread.c’. (read-from-string STRING &optional START END) Read one Lisp expression which is represented as text by STRING. Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX). FINAL-STRING-INDEX is an integer giving the position of the next remaining character in STRING. So it looks like read-from-string is working as advertised here?
bug-gnu-emacs <at> gnu.org
:bug#69049
; Package emacs
.
(Sun, 11 Feb 2024 13:33:02 GMT) Full text and rfc822 format available.Message #14 received at 69049 <at> debbugs.gnu.org (full text, mbox):
From: Marco Antoniotti <marco.antoniotti <at> unimib.it> To: Eli Zaretskii <eliz <at> gnu.org> Cc: Philip Kaludercic <philipk <at> posteo.net>, 69049 <at> debbugs.gnu.org Subject: Re: bug#69049: 29.2; Buglet in `read-from-string' (and, likely, `read') with defstructs. Date: Sun, 11 Feb 2024 14:31:55 +0100
[Message part 1 (text/plain, inline)]
It looks like the buglet is fixed in 30.x. It is still there in 29.2. Eli, the slot value is set incorrectly in the structure returned (in 29.2). MA On Sun, Feb 11, 2024 at 2:26 PM Eli Zaretskii <eliz <at> gnu.org> wrote: > > Cc: 69049 <at> debbugs.gnu.org > > From: Philip Kaludercic <philipk <at> posteo.net> > > Date: Sun, 11 Feb 2024 12:37:08 +0000 > > > > Marco Antoniotti <marco.antoniotti <at> unimib.it> writes: > > > > > Hi > > > > > > Here is the problem. This is in IELM. > > > > > > ELISP> (cl-defstruct foo (msg "bar")) > > > foo > > > ELISP> (make-foo) > > > #s(foo :msg "bar") > > > > > > ELISP> (make-foo :msg "baz") > > > #s(foo :msg "baz") > > > > > > ELISP> (read-from-string "#s(foo :msg \"baz\")") > > > (#s(foo :msg :msg) > > > . 18) > > > > FWIW on Emacs 30.0.50 I get > > > > (read-from-string "#s(foo :msg \"baz\")") ;=> (#s(foo :msg "baz") . 18) > > The doc string of read-from-string says: > > read-from-string is a built-in function in ‘src/lread.c’. > > (read-from-string STRING &optional START END) > > Read one Lisp expression which is represented as text by STRING. > Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX). > FINAL-STRING-INDEX is an integer giving the position of the next > remaining character in STRING. > > So it looks like read-from-string is working as advertised here? >
[Message part 2 (text/html, inline)]
Eli Zaretskii <eliz <at> gnu.org>
:marco.antoniotti <at> unimib.it
:Message #19 received at 69049-done <at> debbugs.gnu.org (full text, mbox):
From: Eli Zaretskii <eliz <at> gnu.org> To: Marco Antoniotti <marco.antoniotti <at> unimib.it> Cc: philipk <at> posteo.net, 69049-done <at> debbugs.gnu.org Subject: Re: bug#69049: 29.2; Buglet in `read-from-string' (and, likely, `read') with defstructs. Date: Sun, 11 Feb 2024 16:39:07 +0200
> From: Marco Antoniotti <marco.antoniotti <at> unimib.it> > Date: Sun, 11 Feb 2024 14:31:55 +0100 > Cc: Philip Kaludercic <philipk <at> posteo.net>, 69049 <at> debbugs.gnu.org > > It looks like the buglet is fixed in 30.x. It is still there in 29.2. > > Eli, the slot value is set incorrectly in the structure returned (in 29.2). OK, closing.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Mon, 11 Mar 2024 11:24:09 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.