From unknown Sat Jun 14 03:57:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43621 <43621@debbugs.gnu.org> To: bug#43621 <43621@debbugs.gnu.org> Subject: Status: 28.0.50; Clean up EIEIO Reply-To: bug#43621 <43621@debbugs.gnu.org> Date: Sat, 14 Jun 2025 10:57:57 +0000 retitle 43621 28.0.50; Clean up EIEIO reassign 43621 emacs submitter 43621 Michael Heerdegen severity 43621 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 15:50:14 2020 Received: (at submit) by debbugs.gnu.org; 25 Sep 2020 19:50:14 +0000 Received: from localhost ([127.0.0.1]:45386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLtjS-00085v-2p for submit@debbugs.gnu.org; Fri, 25 Sep 2020 15:50:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:40756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLtjO-00085m-Pd for submit@debbugs.gnu.org; Fri, 25 Sep 2020 15:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLtjO-0008DN-Bs for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2020 15:50:10 -0400 Received: from mout.web.de ([217.72.192.78]:59057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLtjI-0007sJ-Ez for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2020 15:50:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1601063387; bh=jnp3ZlNBG1kl1koRHGlXrmbZ5VBQB9vJkgrMDhXZ2Og=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=Q78whWVUgimIhMtSfYdI5LCUDbmKoG9qq/+4H8dEYNwQT8vMHYzpE60HX5v8WY78T 5acOL/Ij9Xo1JxLhdG/zN+kFcy/pDn1tzvX9qMYr81mrTSROqdyeTQhgTguTKV8fdO wmK4Ds9BdZEh38IfonmXJ/fk7kKpv6kWsxLnFEL8= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.218.220.78]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LylnX-1kXqZg27KJ-0167Pl; Fri, 25 Sep 2020 21:49:47 +0200 From: Michael Heerdegen To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Clean up EIEIO Date: Fri, 25 Sep 2020 21:49:46 +0200 Message-ID: <87ft751vs5.fsf@web.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:aLNdbYdt5xP6WCcWb5JuDKaliZRp2ZRc7cspshb3txj0cWpOh3p mkqMOyAmFKzgktrRWg52Zf3r5KUhqZ0nRHa88xtO0kav+3/XXAGO+7mJ79bboG2vfZXigBl UeUD1Hmcd2iqXk2ORUNCU0NPmOUnw+XZUk7klFjO0go9+vR+TTa1GdI/4aHqz1g6pV85LnK dpKQNd4XeU/6ToG9/spLQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:2bMKErD1uv8=:WRCWYcHMnIWltVbQ+t6c3A AQM7e7XlEJhLsniMKOyD1OLQa5uqOvHW/NRKK5XgYDL5+o4s/STSfHltO3PMd1MJyDiC2sr9m pShfgnGjygmjVuxNoTiGvNmpma8BKtahPozIzOW2woh4dNg7dSOct2/IQ4IkP4qu3OU21uqxY Ac3gw2zLvKw45qfS7yw+xu2UD39P/Qq+9M3ehXzRCZUlVeARo8ikEA7I48fdxlRoR5/fl9TRn CO0xnp1MXTphDoCxaqENdWFqnrtcrttMaxJms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-from=michael_heerdegen@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/25 15:50:01 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit Cc: Eric Abrahamsen , Stefan Monnier 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: -2.4 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I'm currently seriously learning and using EIEIO for the first time. Here are my findings (so far): (1) Manual (1a) (info "(eieio) Introduction") | Method dispatch | EIEO does not support method dispatch for built-in types and | multiple arguments types. In other words, method dispatch only | looks at the first argument, and this one must be an EIEIO type. What's said about dispatching only looking at the first argument is not true anymore, right? And | =E2=80=98:around=E2=80=99 method tag | This CLOS method tag is non-functional. Also not correct any more, right? That whole paragraph should be overhauled and adapted to the obviously new state of the code I guess. (1b) Manual (info "(eieio) Building Classes") | Whenever defclass is used to create a new class, a predicate is created | for it, named =E2=80=98CLASS-NAME-p=E2=80=99: |=20 | -- Function: CLASS-NAME-p object | Return non-=E2=80=98nil=E2=80=99 if and only if OBJECT is of the cla= ss CLASS-NAME. I found it surprising that the predicate fails for instances of classes that inherit from CLASS-NAME. If this is intended, I guess this should be mentioned...? (2) `info-lookup' doesn't work for eieio functions. I guess it should? (3) Doc of `defclass': | :writer - A function symbol which will `write' an object's slot. I find "`write'" confusing: there is no function `write' (so why quote it like this?), and it should better be "set" anyway, since in other places (in eieio!) "write" is used as synonym for "print". (4) Whitespace in generated docs In quite a few places generated docs have newlines missing or misplaced space characters and such things. Stuff like this: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=eieio-whitespace-example.patch Content-Transfer-Encoding: quoted-printable diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 5bf74792c0..5701fcf026 100644 =2D-- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -800,8 +800,9 @@ cl--describe-class ;; Type's documentation. (let ((doc (cl--class-docstring class))) - (when doc - (insert "\n" doc "\n\n"))) + (if doc + (insert "\n" doc "\n\n") + (insert "\n"))) ;; Describe all the slots in this class. (cl--describe-class-slots class) diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 59af7e12d2..b9bab42470 100644 =2D-- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -136,9 +136,9 @@ eieio-help-constructor (def (symbol-function ctr))) (goto-char (point-min)) (prin1 ctr) - (insert (format " is an %s object constructor function" + (insert (format " is an%s object constructor function" (if (autoloadp def) - "autoloaded" + " autoloaded" ""))) (when (and (autoloadp def) (null location)) --=-=-= Content-Type: text/plain Some love is needed here. Ok, that's what I found so far. TIA, Michael. In GNU Emacs 28.0.50 (build 49, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0) of 2020-09-25 built on drachen Repository revision: d10ef50c9b7c8eeb04194edc8d729dcc5a41b8f6 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Debian GNU/Linux bullseye/sid --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 25 16:53:15 2020 Received: (at submit) by debbugs.gnu.org; 25 Sep 2020 20:53:15 +0000 Received: from localhost ([127.0.0.1]:45446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLuiR-00019O-HQ for submit@debbugs.gnu.org; Fri, 25 Sep 2020 16:53:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:46890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLuiP-00019G-ME for submit@debbugs.gnu.org; Fri, 25 Sep 2020 16:53:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLuiP-0000os-BB for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2020 16:53:13 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLuiM-000766-VD for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2020 16:53:12 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 72C0D100272; Fri, 25 Sep 2020 16:53:09 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 93A0A10022D; Fri, 25 Sep 2020 16:53:07 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1601067187; bh=vxNuMw7T6wFvfoV3i1YVsf9U0XPrVtoB9KZs34JlKK0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=egryTPH+kfXFB8f1EWNHmGBAE9jliRa66w+mQ4bdccheiJzln1tdAwq/4xG0Dj3DR ho8p2LPXCeLsdgF0qdWSzvq1udJ8Zm1KmBE+dYrv6xUAyeHmOp5p432URoOS9eF6LP 55OzUTKLpSD6DKOaJfZTY74Yw6FdEZgxGLzArCBtmPDSLXOZ3t+ovGBBjONWFLfHkZ 9N3jUWQN+JHza0dQuvo9ZogYwkXTUIUXbrOi23M5G551ZeOjPJH6u/9LBISghXzJin 8Wyqz3HZHjJ4+HNAar3x6pRP/gOotAQjFC2MMklvBv086ghOLgTZrSR25wFHN1LwL6 1iUMFz722MuVg== Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 688FA1202CD; Fri, 25 Sep 2020 16:53:07 -0400 (EDT) From: Stefan Monnier To: Michael Heerdegen Subject: Re: 28.0.50; Clean up EIEIO Message-ID: References: <87ft751vs5.fsf@web.de> Date: Fri, 25 Sep 2020 16:53:01 -0400 In-Reply-To: <87ft751vs5.fsf@web.de> (Michael Heerdegen's message of "Fri, 25 Sep 2020 21:49:46 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.053 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/25 16:32:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Eric Abrahamsen , bug-gnu-emacs@gnu.org 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: -2.3 (--) > I'm currently seriously learning and using EIEIO for the first time. > Here are my findings (so far): > > (1) Manual > > (1a) (info "(eieio) Introduction") > > | Method dispatch > | EIEO does not support method dispatch for built-in types and > | multiple arguments types. In other words, method dispatch only > | looks at the first argument, and this one must be an EIEIO type. > > What's said about dispatching only looking at the first argument is not > true anymore, right? And Indeed. EIEIO's method dispatch has been thrown away, and instead cl-generic.el provides it separately from EIEIO. IOW nowadays "EIEIO" refers to the facilities surrounding `defclass` but not method dispatch any more. Also: cl-generic *can* dispatch on built-in types (and defstruct types). > | =E2=80=98:around=E2=80=99 method tag > | This CLOS method tag is non-functional. > Also not correct any more, right? > That whole paragraph should be overhauled and adapted to the obviously > new state of the code I guess. And moved out of `eieio.texi`. > | Whenever defclass is used to create a new class, a predicate is created > | for it, named =E2=80=98CLASS-NAME-p=E2=80=99: > |=20 > | -- Function: CLASS-NAME-p object > | Return non-=E2=80=98nil=E2=80=99 if and only if OBJECT is of the c= lass CLASS-NAME. > > I found it surprising that the predicate fails for instances of classes > that inherit from CLASS-NAME. If this is intended, I guess this should > be mentioned...? Indeed. It might also be better to promote `(cl-typep EXP ')` instead of `-p`, which behaves in the more "normal" way. > (2) `info-lookup' doesn't work for eieio functions. I guess it should? It would be nice to make it work, yes. > (3) Doc of `defclass': > | :writer - A function symbol which will `write' an object's slot. > I find "`write'" confusing: there is no function `write' (so why quote > it like this?), and it should better be "set" anyway, since in other > places (in eieio!) "write" is used as synonym for "print". Agreed. It should also be improved to clarify what arguments the writer takes (IIUC the writer function will take 2 args (the object and a value for the slot), so the doc needs to clarify in which order those args are supposed to come). > Some love is needed here. Can you provide that love? Stefan