From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.bugs Subject: bug#51068: 28.0.50; eieio defclass regression in emacs 28 Date: Thu, 7 Oct 2021 08:33:39 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001e5cba05cdbd729a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21052"; mail-complaints-to="usenet@ciao.gmane.io" To: 51068@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 07 08:34:12 2021 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 1mYMyp-0005Dk-1i for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 08:34:11 +0200 Original-Received: from localhost ([::1]:39138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYMyo-0007qC-59 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Oct 2021 02:34:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYMyh-0007pp-28 for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:34:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYMyg-0005VC-Qx for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYMyg-0007b6-Fb for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dalanicolai Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Oct 2021 06:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51068 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.163358843929195 (code B ref -1); Thu, 07 Oct 2021 06:34:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2021 06:33:59 +0000 Original-Received: from localhost ([127.0.0.1]:45805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYMyc-0007ao-7c for submit@debbugs.gnu.org; Thu, 07 Oct 2021 02:33:58 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:42536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYMyY-0007ae-Gg for submit@debbugs.gnu.org; Thu, 07 Oct 2021 02:33:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60014) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYMyX-0007om-OW for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:33:54 -0400 Original-Received: from mail-ua1-x933.google.com ([2607:f8b0:4864:20::933]:37578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYMyV-0005M0-Np for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 02:33:53 -0400 Original-Received: by mail-ua1-x933.google.com with SMTP id i13so3533828uat.4 for ; Wed, 06 Oct 2021 23:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=MiSUa86GxXBEMECRUITmf0V9IFmxMdxZAcbAlJWiO+M=; b=qZQleaSjRqCmkenZx5R42xc8GduXC6C9AOmQA1e2AIGiU204ihA7rJZBpq638pR/z+ NZv3Gq0y+m5/qBn96hY6DZFxIkLkAjm5nJfMl2BE6PrnDdo7BHiWGtI9K7NYCi/wX3Bs Ai4TfqDGezZGtZKnO8C/BljXUCCv+QqhI0yQKBL5WUleRNng2Bi1oecbob3BreSnT2Wi zkIHJOKw+wwx08WzUvokx7cT6r9qmg5IfnwH/7crA5V4SAudUs2k88mfacyAteyGw20U YIzFqjX7e6tmiv5Wr4kNJVoTWp9FlQ7+8DBEt0au8ghoveI6CrD5+UelZc6ldo7j1a3A HXJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=MiSUa86GxXBEMECRUITmf0V9IFmxMdxZAcbAlJWiO+M=; b=eK4JK3mTXXvHkhZ4uZROff9C+AaAf9k7B0hfBfE/lTAxqzQsN79yTzJWX/Xa0PDlKW yBvOWFku+mh/hC86yVM0yoggRMX3seBodfOlqJQq1b2Y79DieCDxzNc3p/DQATUJ/RYn MA8iolYGLNroX3pc5B66Vms4LOzHccf9Xw9oms+E1fdvZItMWitU4O94OM2GHvLjU33D i9PxaD4szjODUC/FYR2wjow3jmLwMtqjd1PUC6WMu8L1NsKZgaeVYXzIjhvULwWMYylE HsxNuJX83RctnY1xLBHFDpgl8nijKyPbChr0exzw/2lnO5p7972/YoPs0XQ+/V5WpU1v N7sA== X-Gm-Message-State: AOAM530Ica3TcwNchldmdxjTC8qJo6AwJtKf1/z/CnmpPq0JGT1AS3Ey W/mtbqtbTJHowRAMF7TH9z4e3mSzfrzdbEtNEACzOfp9+yNqSw== X-Google-Smtp-Source: ABdhPJw2ngBK9z/Mo+TEYb3ljt2PGB6DxBsUTw86MfARsbJ5j/WDDmK9kqnZ5q1lqxaXCM7hb0hubfkM1xFWBIndmjY= X-Received: by 2002:ab0:2758:: with SMTP id c24mr2741835uap.134.1633588430657; Wed, 06 Oct 2021 23:33:50 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::933; envelope-from=dalanicolai@gmail.com; helo=mail-ua1-x933.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, HTML_MESSAGE=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" Xref: news.gmane.io gmane.emacs.bugs:216605 Archived-At: --0000000000001e5cba05cdbd729a Content-Type: text/plain; charset="UTF-8" I see that I 'forgot' to copy-paste the first sentence of my original report, which was: I am trying examples from Paul Graham's book 'On lisp', but using EIEIO. On Thu, 7 Oct 2021 at 08:31, dalanicolai wrote: > I have encountered the following confusing behavior (and 'regression' > compared to Emacs 27). > > Starting from emacs -Q, in Emacs 27 when I try to evaluate the following > code: > > > (require 'eieio) > > (defclass rectangle () > (height width)) > > > different than in CLOS, Emacs errors with: > '(wrong-type-argument listp height)' > > When I evaluate the same code in Emacs 28 then Emacs does not return an > error. > > However, if I subsequently try to initialize the slots using: > > > (let ((r (make-instance rectangle))) > (setf (slot-value r 'height) 2 > (slot-value r 'width) 3)) > > > then Emacs 28 does return an error. If I replace the code to create the > class with (adding the parentheses around the slots): > > > (defclass rectangle () > ((height) (width))) > > > then the code above for initializing the slots works as expected (and > similar behavior when using oref). Which means that also in Emacs 28 the > parentheses are required. So Emacs 27 correctly errors when not using them, > but Emacs 28 suggests that things are alright when omitting the parentheses > which is incorrect and confusing. > > Then additionally, the requirement of the parentheses is, as far as I > could find, not explicitly mentioned as a 'difference from CLOS' in the > manual, which 'additionlly' is confusing. > > > > In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, > cairo version 1.17.4) > of 2021-09-06 built on daniel-fedora > Repository revision: c4724add006e62b81f847937db56335a81bdcc74 > Repository branch: master > Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 > System Description: Fedora 34 (Workstation Edition) > > Configured using: > 'configure --with-mailutils --with-cairo --with-modules --with-pgtk > --with-native-compilation' > > Configured features: > ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG > JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES > NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF > TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB > > Important settings: > value of $LANG: en_US.UTF-8 > value of $XMODIFIERS: @im=none > locale-coding-system: utf-8-unix > > Major mode: Lisp Interaction > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > eldoc-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 > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > > Load-path shadows: > None found. > > Features: > (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs > rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail > rmail-loaddefs auth-source password-cache json map text-property-search > seq mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev > gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util > mail-prsvr mail-utils help-fns radix-tree cl-print debug backtrace > help-mode find-func cl-seq eieio byte-opt bytecomp byte-compile cconv > eieio-core cl-macs gv eieio-loaddefs time-date subr-x cl-loaddefs cl-lib > iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks > lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar > dnd fontset image regexp-opt fringe tabulated-list replace newcomment > text-mode elisp-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 cl-generic > 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 charscript charprop > case-table epa-hook jka-cmpr-hook help simple abbrev obarray > cl-preloaded nadvice button loaddefs faces cus-face macroexp files > window text-properties overlay sha1 md5 base64 format env code-pages > mule custom widget hashtable-print-readable backquote threads dbusbind > inotify lcms2 dynamic-setting system-font-setting font-render-setting > cairo move-toolbar gtk x-toolkit x multi-tty make-network-process > native-compile emacs) > > Memory information: > ((conses 16 74940 7555) > (symbols 48 7056 0) > (strings 32 21134 1155) > (string-bytes 1 724821) > (vectors 16 13991) > (vector-slots 8 277232 15363) > (floats 8 26 33) > (intervals 56 281 0) > (buffers 992 13)) > > > --0000000000001e5cba05cdbd729a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I see that I 'forgot' to copy-paste the first= sentence of my original report, which was:

I am trying examples from Paul Graham's boo= k 'On lisp', but using EIEIO.

On Thu, 7 Oct 2021 at 08:= 31, dalanicolai <dalanicolai@gm= ail.com> wrote:
I have encoun= tered the following confusing behavior (and 'regression'
<= div style=3D"color:rgb(46,52,54);font-family:monospace;font-size:13.3333px;= font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacin= g:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:= 0px;text-decoration:none;width:71ch">compared to Emacs 27).

Starting from emacs -Q, in Emacs 27 when I try to evaluate the followi= ng code:



<= /div>
(defclass rectangle ()
=
=C2=A0 (height width))


different than in CLO= S, Emacs errors with:
'(= wrong-type-argument listp height)'

When I evaluate = the same code in Emacs 28 then Emacs does not return an
error.

However, if I subseq= uently try to initialize the slots using:


(let ((r (make-instance rectangle)))
=
=C2=A0 (setf (slot-value r '= ;height) 2
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 (slot-value r 'width) 3))


then Emacs 28 does retur= n an error. If I replace the code to create the
class with (adding the parentheses around the slots):


(defclas= s rectangle ()
=C2=A0 ((heig= ht) (width)))


then the code above for initializing the slots works as expected (an= d similar behavior when using oref). Which means that also in Emacs 28 the = parentheses are required. So Emacs 27 correctly errors when not using them,= but Emacs 28 suggests that things are alright when omitting the parenthese= s which is incorrect and confusing.

Then additionally, the = requirement of the parentheses is, as far as I
could find, not explicitly mentioned as a 'differenc= e from CLOS' in the manual, which 'additionlly' is confusing.



In GNU Emacs 28.0.50 (build 3, x86_64-p= c-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4)
=C2=A0of 2021-09-06 built on daniel-fedora
=
Repository revision: c4724add00= 6e62b81f847937db56335a81bdcc74
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.= 12011000
System Description:= Fedora 34 (Workstation Edition)

Configured using:
<= /div>
=C2=A0'configure --with-mail= utils --with-cairo --with-modules --with-pgtk
=C2=A0--with-native-compilation'

Configured features:
ACL CA= IRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
=
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTE= MD LIBXML2 M17N_FLT MODULES
= NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
<= /div>
TOOLKIT_SCROLL_BARS X11 XDBE XIM= XPM GTK3 ZLIB

Important settings:
=C2=A0 value of $LANG: en_US.UTF-8
=C2=A0 value of $XMODIFIERS: @im=3Dnone<= br>
=C2=A0 locale-coding-system:= utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2= =A0 global-eldoc-mode: t
=C2= =A0 eldoc-mode: t
=C2=A0 ele= ctric-indent-mode: t
=C2=A0 = mouse-wheel-mode: t
=C2=A0 t= ool-bar-mode: t
=C2=A0 menu-= bar-mode: t
=C2=A0 file-name= -shadow-mode: t
=C2=A0 globa= l-font-lock-mode: t
=C2=A0 f= ont-lock-mode: t
=C2=A0 blin= k-cursor-mode: t
=C2=A0 auto= -composition-mode: t
=C2=A0 = auto-encryption-mode: t
=C2= =A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
= =C2=A0 indent-tabs-mode: t
= =C2=A0 transient-mark-mode: t
Load-path shadows:
None found.

Fe= atures:
(shadow sort mail-ex= tr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config= gnus-util rmail
rmail-loadd= efs auth-source password-cache json map text-property-search
seq mm-decode mm-bodies mm-encode mail-par= se rfc2231 mailabbrev
gmm-ut= ils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-fns radix-tree cl= -print debug backtrace
help-= mode find-func cl-seq eieio byte-opt bytecomp byte-compile cconv
<= div style=3D"color:rgb(46,52,54);font-family:monospace;font-size:13.3333px;= font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacin= g:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:= 0px;text-decoration:none;width:71ch">eieio-core cl-macs gv eieio-loaddefs t= ime-date subr-x cl-loaddefs cl-lib
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win= x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcom= ment
text-mode elisp-mode li= sp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar m= ouse jit-lock
font-lock synt= ax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese = tibetan thai tai-viet lao
ko= rean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
=
european ethiopic indian cyrillic chi= nese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddef= s faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-p= rint-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-= setting
cairo move-toolbar g= tk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory informat= ion:
((conses 16 74940 7555)=
=C2=A0(symbols 48 7056 0)
=C2=A0(strings 32 21134 1155)=
=C2=A0(string-bytes 1 72482= 1)
=C2=A0(vectors 16 13991)<= br>
=C2=A0(vector-slots 8 277232= 15363)
=C2=A0(floats 8 26 3= 3)
=C2=A0(intervals 56 281 0= )
=C2=A0(buffers 992 13))


--0000000000001e5cba05cdbd729a--